Hello, i am trying to pull a leaderstat value so i can use a math operation.
✓ ANSWER ACCEPTED
How do I reference a leaderstat value?
1 answer
✓ Accepted answer
Simple in serverscriptservice
game.Players.PlayerAdded:Connect(function(plr)
local folder = Instance.new("Folder")
folder.Name = "leaderstats"
end)
You need that script to make a leader stat folder if u haven't already
--localscript
plr = game.Players.LocalPlayer
**folder = plr:WaitForChild("leaderstats")**
1 comment
0
Thank you so much! I was being stupid and just couldnt figure it out
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
leaderstats are in the player so
local value = game.Players.PLAYERS_NAME_GOES_HERE.leaderstats.VALUE_YOURE_TRYING_TO_GET.Value