local serverStorage = game:GetService("ServerStorage")
game.Players.PlayerAdded:Connect(function()
local Leaderstats = Instance.new("Folder")
Leaderstats.Name = "leaderstats"
Leaderstats.Parent = plyer
local Strength = Instance.new("NumberValue")
Strength.Name = "Strength"
Strength.Parent = Leaderstats
local dataFolder = Instance.new("Folder")
dataFolder.Name = plyer.Name
dataFolder.Parent = game.ServerStorage.RemoteData
local debounce = Instance.new("BoolValue")
debounce.Name = "Debounce"
debounce.Parent = dataFolder
end)
✓ ANSWER ACCEPTED
y do my leaderstats not show up in game?
1 answer
✓ Accepted answer
Hello, you basically forgot the player in your script. Here is the fix:
local serverStorage = game:GetService("ServerStorage")
game.Players.PlayerAdded:Connect(function(plyer)
local Leaderstats = Instance.new("Folder")
Leaderstats.Name = "leaderstats"
Leaderstats.Parent = plyer
local Strength = Instance.new("NumberValue")
Strength.Name = "Strength"
Strength.Parent = Leaderstats
local dataFolder = Instance.new("Folder")
dataFolder.Name = plyer.Name
dataFolder.Parent = game.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.

2 comments
Hope this helps!
Thz