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

How do I access every players leaderstats in the game?

Asked by 1 year ago

So I made a leaderstats script and I want to access it into another script is this possible here is my code.


game.Players.PlayerAdded:Connect(function(plr) local ls = Instance.new("Folder") ls.Parent = plr ls.Name = "leaderstats" local Levels = Instance.new("IntValue") Levels.Parent = ls Levels.Name = "Levels" Levels.Value = 0 end)

1 answer

Log in to vote
0
Answered by 1 year ago

In other script refer to it as a leaderstats for example:

Player:FindFirstChild("leaderstats")
Ad

Answer this question