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

What is the problem? It says the Global "stats" is deprecated? (leaderboard)

game.Players.PlayerAdded:connect(function(player)
	stats = Instance.new("IntValue",player)
	stats.Name = "Leaderstats"
end)

######Edited ~ Format your code correctly!

3 comments

2

make it local stats

0

i did i think and it didnt work (srry im new at this)

0

ROBLOX probably got confused about you overriding the variable, just ignore it.

2 answers

This should work:

game.Players.PlayerAdded:connect(function(player)
    local stats = Instance.new("IntValue",player)
    stats.Name = "Leaderstats"
end)

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