How to MAKE a TRAIL SHOP in Roblox Studio | Part 5
Вставка
- Опубліковано 15 тра 2023
- 🛠 In this video, I'll show ya how to script up some trails! We're going to be finishing the trail shop gui with a script that will fire our server and we will be able to buy some trails! We will also be working with the Server to script up those trails and being able to equip them! Thanks so much for watching, hope you guys have a great day! Subscribe 😎🛠
😎Subscribe: www.youtube.com/@rustysillyba...
💬Discord: / discord
🌴Roblox Group: www.roblox.com/groups/1729640...
👑Rusty Merch: www.roblox.com/groups/1729640...
📝Tags:
#roblox #lua #robloxstudio #howto #robloxstudiotutorial #tutorial
❓What is Roblox Studio?
🔎Roblox Studio lets you create anything and release with one click to smartphones, tablets, desktops, consoles, and virtual reality devices.
❓Who am I?
🔎I am a Roblox Studio, and Blender, Tutorial UA-camr that you should Subscribe to :) - Навчання та стиль
Local script:
local player = game.Players.LocalPlayer
local trailsFolder = game.ReplicatedStorage:FindFirstChild("Trails")
local TrailRE = game.ReplicatedStorage:FindFirstChild("TrailRE")
local scrollingFrame = script.Parent.ScrollingFrame
local Red = scrollingFrame.Red
local Blue = scrollingFrame.Blue
local Green = scrollingFrame.Green
local descriptionFrame = script.Parent.DescriptionFrame
Red.MouseButton1Click:Connect(function()
if player.OwnedTrails:FindFirstChild("Red") then
descriptionFrame.Color.BackgroundColor3 = Color3.new(1, 0.439216, 0.439216)
descriptionFrame.Cost.Text = "$50"
descriptionFrame.Description.Text = "Red Trail, this will follow you."
descriptionFrame.Buy.Text = "EQUIP!"
else
descriptionFrame.Color.BackgroundColor3 = Color3.new(1, 0.439216, 0.439216)
descriptionFrame.Cost.Text = "$50"
descriptionFrame.Description.Text = "Red Trail, this will follow you."
descriptionFrame.Buy.Text = "BUY!"
end
end)
Blue.MouseButton1Click:Connect(function()
if player.OwnedTrails:FindFirstChild("Blue") then
descriptionFrame.Color.BackgroundColor3 = Color3.new(0, 0.666667, 1)
descriptionFrame.Cost.Text = "$75"
descriptionFrame.Description.Text = "Blue Trail, this will follow you."
descriptionFrame.Buy.Text = "EQUIP!"
else
descriptionFrame.Color.BackgroundColor3 = Color3.new(0, 0.666667, 1)
descriptionFrame.Cost.Text = "$75"
descriptionFrame.Description.Text = "Blue Trail, this will follow you."
descriptionFrame.Buy.Text = "BUY!"
end
end)
Green.MouseButton1Click:Connect(function()
if player.OwnedTrails:FindFirstChild("Green") then
descriptionFrame.Color.BackgroundColor3 = Color3.new(0.333333, 1, 0.498039)
descriptionFrame.Cost.Text = "$100"
descriptionFrame.Description.Text = "Green Trail, this will follow you."
descriptionFrame.Buy.Text = "EQUIP!"
else
descriptionFrame.Color.BackgroundColor3 = Color3.new(0.333333, 1, 0.498039)
descriptionFrame.Cost.Text = "$100"
descriptionFrame.Description.Text = "Green Trail, this will follow you."
descriptionFrame.Buy.Text = "BUY!"
end
end)
descriptionFrame.Buy.MouseButton1Click:Connect(function()
if descriptionFrame.Color.BackgroundColor3 == Color3.new(1, 0.439216, 0.439216) then
local trail = trailsFolder.Red
TrailRE:FireServer(trail)
end
if descriptionFrame.Color.BackgroundColor3 == Color3.new(0, 0.666667, 1) then
local trail = trailsFolder.Blue
TrailRE:FireServer(trail)
end
if descriptionFrame.Color.BackgroundColor3 == Color3.new(0.333333, 1, 0.498039) then
local trail = trailsFolder.Green
TrailRE:FireServer(trail)
end
end)
Server Script:
local trailsFolder = game.ReplicatedStorage:WaitForChild("Trails")
local TrailRe = game.ReplicatedStorage:FindFirstChild("TrailRE")
TrailRe.OnServerEvent:Connect(function(player, trail)
if player then
if not player.OwnedTrails:FindFirstChild(trail.Name) then
if trail.Cost.Value
that is LONG
im dead on this part doing stuff and checking error + typo, ill try to re watch again tomorrow
wow thankyou so much
Hello, very cool videos. Do you know how to make sure that your purchases are saved when you re-enter the game?
This helped me a lot man! Thank you! :)
Really Helpful
Glad to see you making a lot of content keep it up! Can't tell you how many tutorials are so lack luster. My advice would be to focus on one series and finish it because I feel you have a lot of series and videos going on but still great content.
Yeah, I was finishing this one off and then I'm going to be focusing on certain ones. Thanks for the advice!
FINALLY!!! THANKS MAN
Thank you for a new video!!!
TYSMMMM BRO MAD RESPECT TO THIS GUY!!!
This is really good for my game. I should turn on nofications.
today I will finally start getting back into scripting the trails
Holy crap! I just finished this and to be honest, it is one of the most noob-friendly and well made tutorials out there! Kudos to Rusty!
Btw, do I put you in credits, Rusty?
Thank you! And no need to credit me, you did the work!
@@rustysillyband alright. Thanks again for this amazing series of tutorials!
Hi RustySillyband, thanks for the tutorial! Could you please provide some help on how to save the players's trails so that they have them when they leave and rejoin? This is really important to me
AWESOMEE SORRY I HAVENT BEEN ABLE TO DEV SINCE OUR HOUSE IS BEING WORKED ON
what if i want to make a datasaving system for the trails?
i cant get the ownedtrails folder to be parented to the player i copied exactly can u help?
First comment
Hi! Does the trailshop save?
If you're having trouble getting the scripts to work, here are some solutions:
- MAKE SURE that your trails are ENABLED (I didn't do this and it took me a day of screaming at my monitor to realise)
- Make sure your scripts are identical to the ones in the video ( the pinned comment has both scripts)
-If you're trying to change the scripts to be an only equip script or something else like that, please please PLEASE just start with the scripts in the video and watch the part where he explains it all and then change your scripts line by line to see what works and doesn't
- And finally, don't get stressed if it doesn't work, just re-watch the video/s and make sure you've got everything right because the scripts do work.
- And if they still don't work, you've probably done something wrong and I recommend just re-watching the whole series (it really doesn't take that long)
Hi i have a problem can you help me pls
Can someone help me I'm a new scripter and Idk how to fix my problem where it doesn't let me buy anything, my cash value doesn't decrease neither does the "BUY!" text change to "EQUIPED!"
hey uhm could you do a tutorial for parkour movement an combat parkour
does it save?
Can you help me make it save because it is not saving for my game
Hello I have a video idear you don't have to because it's complicated but if you would like could you do a horror game one !!
I was honestly thinking about that!
can you do a tutorial on how to make hail in Roblox studio next?
Such as the ice that falls from the sky?
@@rustysillyband yeah!
how would i make it so that you just get the trail in the shop when you touch a part or get a badge?
Have you learnt Events (Touch Detection) and the Marketplace Service (Badge)?
@@YeahEsCereal no, i havent. im very new to scripting, i mostly just use turtorials.
@@InfiniteG1itch you can try and learn that
6:28
if the player dies the trail no longer exists! please fix that
Did you find a fix?
This entire tutorial didn't need to be this long and have 5 video, nor did these scripts have to be this long. Amateur at best
Indeed. Back then I was still a noobie at scripting and simply wanted to make a tutorial.
@@rustysillyband ah we were all there once, if what comes from it is experience I don’t see an issue.
@@Liam-jv1wc Thanks for understanding! Have a great day/night.
Pls send new invite to discord server, it doesn't work
i get no errors but if i want to have the wins leaderstats in a separate script?
update: i modified the code a little bit and now it gets the existing wins from another script
Alsoo sometimes the OwnedTrails folder doesnt appear under the player and it got a error and its not from the new script i made