when i run this it adds coin and rebirgth to me in addition to my cash and energy but in my script i asked for cash and energy can you help me create my leaderstats!
my code :
function onPlayerEntered(newPlayer) wait(.5) local stats = Instance.new("IntValue") stats.Name = "leaderstats"
local score = Instance.new("IntValue")
score.Name = "Cash" -- Change "Cash" with Your Leaderstats Name
score.Value = 0
score.Parent = stats
stats.Parent = newPlayer
local score = Instance.new("IntValue")
score.Name = "Energy" -- Change "Energy" with Your Leaderstats Name
score.Value = 0
score.Parent = stats
stats.Parent = newPlayer
end

2 comments
stats is a "Folder" not an "IntValue".
S'il vous plaît, pouvez-vous m'écrire mon script