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

Leaderstats not appearing on my game, any hints/help/solution for me?

Asked by 4 years ago
Edited 4 years ago
local serverStorage = game:GetService("ServerStorage")

game.Players.PlayerAdded:Connect(function(player)

    local leaderstats = Instance.new("Folder")
    leaderstats.Name = "leaderstats"
    leaderstats.Parent = player

    local strength = Instance.new("NumberValue")
    strength.name = "Strength"
    strength.Parent = leaderstats

    local dataFolder = Instance.new("Folder")
    dataFolder.Name = player.Name
    dataFolder.Parent = serverStorage.RemoteData

    local debounce = Instance.new("BoolValue")
    debounce.Name = "Debounce"
    debounce.Parent = dataFolder


end)

any hints?

0
http://idownvotedbecau.se/itsnotworking and "hints/help/solution for me?" For "me"? What about everyone else. It is discouraged to ask questions that only benefit yourself. They should benefit other people too. programmerHere 371 — 4y
0
^ How about actually trying to help him instead of downvoting. Tyler090130 619 — 4y
0
When i added leaderstats, i get the datastoreservice, i'm not sure if it helps jaydeplay150 20 — 4y

2 answers

Log in to vote
0
Answered by 4 years ago

My best guess is that it probably doesn't show up because you didn't set a value to the "NumberValue". Roblox might just not display it because of that. Also, just make sure your script is in a Script and not a LocalScript.

If you have any questions or issues please contact me. ;)

Ad
Log in to vote
0
Answered by
NSMascot 113
4 years ago
local serverStorage = game:GetService("ServerStorage")

game.Players.PlayerAdded:Connect(function(player)

    local leaderstats = Instance.new("Folder")
    leaderstats.Name = "leaderstats"
    leaderstats.Parent = player

    local strength = Instance.new("NumberValue")
    strength.name = "Strength"
    strength.Parent = leaderstats

    local dataFolder = Instance.new("Folder")
    dataFolder.Name = player -- Originally you put '.Name' at the end of this line! 
    dataFolder.Parent = serverStorage.RemoteData

    local debounce = Instance.new("BoolValue")
    debounce.Name = "Debounce"
    debounce.Parent = dataFolder


end)

Answer this question