I am working on a test game but it needs currency to buy certain things
✓ ANSWER ACCEPTED
How do I add money in a game, and if they spend it how would that work?
1 answer
✓ Accepted answer
We make something called leaderstats here's the script
and btw scripting helpers.Org is not a request site
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local coins= Instance.new("IntValue")
coins.Name = "Coins"
coins.Value = 0
coins.Parent = leaderstats
end)
To buy something make a local script in a UI button for example
player.leaderstats.Coins.Value = player.leaderstats.Coins.Value - 100
Under here make the script do something
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
I think this site is mainly about scripting issues, before asking a vague question, try searching about your objective, I think this can help you: https://developer.roblox.com/en-us/articles/Leaderboards when you have a scripting question, i will be more than happy to help.