Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Mainscript dosen't change team on the second round?

Asked by 6 years ago

All is working fine at the first round but at the second round it dosen't change team also no error and the game is fe

Script:

for i,v in pairs(game.Players:GetPlayers()) do
    if Spys.Value == 0 then
    if v.Team.Name == "Secret Service" then


        v.Team = game.Teams.Spy

        Spys.Value  = Spys.Value  + 1
    end
    end
end

1 answer

Log in to vote
0
Answered by
yyyyyy09 246 Moderation Voter
6 years ago

I believe you never set the Spy.Value back down to 0, so it will never run the if statement if Spys.Value == 0 then again

0
Nope it's always setting the value down to 0 but i found a solution already stommmDev 7 — 6y
Ad

Answer this question