I have this script where every 60 seconds the player will change teams randomly. i put the script in workspace and it isnt working! so can someone please help me with this?
this is the code:
local player = game.Players.LocalPlayer
local TeamValue = 0
while true do
wait(60)
TeamValue = math.random(1, 2)
if TeamValue == 1 then
player.Team = "Red Team"
end
if TeamValue == 2 then
player.Team = "Blue Team"
end
end

1 comment
Thanks for the help!