Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What is broken in my Roblox Studio Shop Gui Buy Script? (Language is Lua if you dont know)

Asked by 5 years ago

I put this script into a text button on my Shop GUI on Roblox Studios, but for some reason it isn't cloning the item from replicated storage into the player's inventory, or subtracting the price from the player's money. (In this case cool points) Here is the script I am having trouble with.

!

1 answer

Log in to vote
0
Answered by 5 years ago

You are not saying who the actual player is add local player = game.Players.LocalPlayer and u can also do local leaderstats = player:WaitForChild("leaderstats") so do if player.leaderstats.Cool_Points.Value >= price then (rest of the code) I would also adapt the code after this so that it is like player.leaderstats.Cool_Points.Value (continued)

Ad

Answer this question