im trying to make a intermission script and a ingame script so when there are only 1 player in the alive team the game goes back to intermission.
error it GetPlayers: : Expected 'then' when parsing if statement, got 'GetPlayers'
Script thats in worKSPAce:
local seconds = game.Workspace.Time local Game = game.Workspace.Game.Position while true do wait(1) seconds.Value = seconds.Value - 1 if teams.Alive GetPlayers == 1 then local teleport = game.Players:GetChildren() for i = 1, #teleport do teleport[i].Character:MoveTo(Vector3.new(Game.X, Game.Y, Game.Z)) end end local teleport = game.Players:GetChildren() for i = 1, #teleport do teleport[i]:LoadCharacter() end end
On line 9 you forgot to put a . so it should be:
local seconds = game.Workspace.Time local Game = game.Workspace.Game.Position while true do wait(1) seconds.Value = seconds.Value - 1 if teams.Alive.GetPlayers == 1 then local teleport = game.Players:GetChildren() for i = 1, #teleport do teleport[i].Character:MoveTo(Vector3.new(Game.X, Game.Y, Game.Z)) end end local teleport = game.Players:GetChildren() for i = 1, #teleport do teleport[i]:LoadCharacter() end end