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

Halp! Nothing is coming out on the output, and this script doesn't add to the value?

while true do
	for _,v in pairs(game.Players:GetPlayers()) do
		if v.TeamColor == BrickColor.Red then
			script.Parent.Value = script.Parent.Value + 1
		end
	end
	wait()
end

what this script does is basically keeps checking if players switch to red and when they do it'll add to the value.

1 answer

✓ Accepted answer

You are missing some parantheses on line 03.


while true do
    for _,v in pairs(game.Players:GetPlayers()) do
        if v.TeamColor == BrickColor.Red() then
            script.Parent.Value = script.Parent.Value + 1
        end
    end
    wait()
end

1 comment

0

HungryJaffer breaks his computer in anger.

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