Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do i make leaderstats on roblox that shows stats?

i wanna make leaderstats for my game like leaderboards saying coins: 1000 please answer meh heres my script:

print(leaderstats)

1 answer

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)

2 comments

0

thank you it works :D

0

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".

This discussion is preserved as it was. New answers, comments, and votes are closed.