Hello I am trying to make this script check more than once for the player's team. I tried a while loop but this did nothing.

player = game.Players:GetPlayers()

while wait() do
script.Parent.MouseButton1Click:connect(function()
if player.TeamColor == BrickColor.new("Persimmon") then
	script.Parent.Parent.Visible = false
	script.Parent.Parent.Parent.Booking.Visible = true
else
	script.Parent.Parent.Visible = false
	script.Parent.Parent.Parent.Wrong.Visible = true
end	
end
end)

1 comment

0

Could you explain more?