Leaderboard Script

Hello, I do not know much about scripting;
so please don’t make fun of me. Back to the main point I do not know why it is not working, but no errors in the output. (I’m trynna script a leaderstats/Leaderboard script)

local Plr = game.Players.LocalPlayer

game.Players.PlayerAdded:Connect(function(Player)
	local leaderstats = Instance.new("Folder")
	leaderstats.Name ="leaderstats"
	leaderstats.Parent = Plr
	local Gems = Instance.new("IntValue")
	Gems.Name = "Shards"
	Gems.Value = 400
	Gems.Parent = leaderstats
end)

I’m not sure what I should do.

1 Like

You cant use localplayer is a server script so do

replace Plr with Player

@Sk3Il3tonz

1 Like

Refer to this: In-Experience Leaderboards | Roblox Creator Documentation.

Follow it step by step - it’ll tell you how everything works.

1 Like