Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do i make leaderstats on roblox that shows stats? [closed]

Asked by 5 years ago

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

print(leaderstats)

Closed as Not Constructive by superalp1111, User#21908, and User#19524

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?

1 answer

Log in to vote
0
Answered by 5 years ago
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)
0
thank you it works :D NikoSquaredd -5 — 5y
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". lunatic5 409 — 5y
Ad