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

Why dosen't this check a players leaderstats?

while true do
	if game.Players:GetPlayers().leaderstats.Stage.Value == 45 then
		print("HELLO")
	end	
	wait(1)
end	

Why wont this check all the players leaderstats?

for i,v in pairs(game.Players:GetPlayers()) do
	if v.leaderstats.Stage.Value == 45 then
		print("HELLO")
	end
	wait(1)
end

another test

1 answer

✓ Accepted answer
while true do
    for i,v in pairs(game.Players:GetChildren()) do --I'm not sure if GetPlayers is a thing, but I use GetChildren.
	if v.leaderstats.Stage.Value == 45 then
	print("Hello")
	end
    end
wait(1)
end

2 comments

0

GetPlayers() does exist, just didnt know which one to use, thanks :D

0

No problem/.

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