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)
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!
Closed as Not Constructive by jediplocoon, Nguyenlegiahung, Wiscript, and JesseSong
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?