like how do you make a shop to spend your currency on like i want to make a shop gui and when i press purchase i have the item.
COMMUNITY QUESTION
How do you make your currency spendable?
1 answer
localscript
local cash = game.Players.leaderstats.Cash
local gui --script.Parent??
local item -- item...
local amount = 100
gui.MouseButton1Click:Connect(function()
if cash.Value >= amount then
item:Clone().Parent = game.Players.LocalPlayer.BackPack
cash.Value = cash.Value - amount
end
end)
The only reason why this will not work is because gui is not defined, gui is meant to be the button and the cash is not defined "Properly" Amount is the amount you need to buy the object the script may not work depending on the item, you code the item part, I don't know your explorer
Won't work with filter enabled
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Where the code you did? I dont even know if its FE