i wanna make leaderstats for my game like leaderboards saying coins: 1000 please answer meh heres my script:
print(leaderstats)
i wanna make leaderstats for my game like leaderboards saying coins: 1000 please answer meh heres my script:
print(leaderstats)
function onPlayerEntered(newPlayer)
wait(0)
local stats = Instance.new("NumberValue")
stats.Name = "leaderstats"
local cash = Instance.new("NumberValue")
cash.Name = "moistbux"
cash.Value = 0 --This sets the amount of money every player starts with
cash.Parent = stats
stats.Parent = newPlayer
local cash = Instance.new("NumberValue")
cash.Name = "moistbirths"
cash.Value = 1 --This sets the amount of money every player starts with
cash.Parent = stats
stats.Parent = newPlayer
end
game.Players.PlayerAdded:connect(onPlayerEntered)
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
thank you it works :D
Niko, you should accept Samirjan's answer so he can earn reputation. This will help others know that he is a reputable member of this website. This also helps others know that your problem has been solved before clicking on the question from the home page. You can accept an answer by pressing the button below the question that reads "Accept Answer".