Easy to do! First, insert a server script inside ServerScriptService
.
Script:
01 | local Players = game:GetService( "Players" ) |
03 | Players.PlayerAdded:Connect( function (player) |
05 | local leaderstats = Instance.new( "Folder" ) |
06 | leaderstats.Parent = player |
08 | local Cash = Instance.new( "IntValue" ) |
11 | Cash.Parent = leaderstats |
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!
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?