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

For loop ieterating through players broken. Could someone explain?

I've inserted a value into each player that joins the game called, "player" but this script isn't working.

--Made by Aceta

players = game.Players:GetPlayers()

function getPlayers()
	for i, v in pairs(#players) do
		if v.play.Value == false then
			Instance.new('Message', Workspace).Text = 'yay we can start'
		end
	end
end

3 comments

0

When you use "v.play.Value", are you trying to access your "player" value?

0

No, there's a boolValue in each player called "play"

0

Ermegherd. I never called the freaking function. I forgot I made it a function. -facepalm- Take this as a lesson kids, never code on a late night.

1 answer

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