while true do if game.Players.NumPlayers< 3 then script.Parent.Visible = true wait(.5) script.Parent.Visible = false elseif game.Players.NumPlayers>= 3 then script.Parent.Visible = false end end
Please fix this! Thanks! It does not work for me!
Your code is in a while loop, so here's the order things will happen if the number of players is less than 3:
script.Parent.Visible = true wait(.5) script.Parent.Visible = false --immediately it goes back to the start of the loop, setting script.Parent.Visible = true
You need to add a wait(0.5) after script.Parent.Visible = false, because otherwise the loop restarts and it immediately sets script.Parent.Visible = true