I am currently trying to make currency for my game, "Adventure Run". I would appreciate it if you tell me how.
Thank you!
-- WOWgamerboyYT
I am currently trying to make currency for my game, "Adventure Run". I would appreciate it if you tell me how.
Thank you!
-- WOWgamerboyYT
Easy to do! First, insert a server script inside ServerScriptService.
Script:
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder")
leaderstats.Parent = player
local Cash = Instance.new("IntValue")
Cash.Name = "Cash"
Cash.Value = 50
Cash.Parent = leaderstats
end)
##Explanation
We use PlayerAdded function so that it fires whenever a player joins. We create a folder and name it leaderstats, parent it to the player. We create an IntValue, name it Cash, Set it's value and parent it inside the leaderstats!
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
You can make currency by... making currency
https://developer.roblox.com/en-us/recipes/How-to-create-a-leaderboard