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

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

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?

3 comments

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.

0

^ How about actually trying to help him instead of downvoting.

0

When i added leaderstats, i get the datastoreservice, i'm not sure if it helps

2 answers

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. ;)

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)

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