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

How to teleport teams after intermission?

Asked by 7 years ago
Edited 7 years ago

I have been watching every single tutorial known to man, I have tried every single thing and/or way. I have even watched ALVINBLOX's tutorials. But i cannot get over this. I have been in the making of a horror game and i wanted to teleport two teams (One team with the survivors and the other team with the killer) after the intermission has ended and i would like to teleport both of the teams back to the lobby once the round has ended. May anyone help please? I will be very thankful.

1 answer

Log in to vote
0
Answered by 7 years ago

Well, here's how I would go about doing it:

for i,v in pairs(game.Players:GetChildren()) do
    if v.Team == "Survivors" or v.Team == "Killer" then -- This checks to see if their team is "Survivors" or "Killer". (You can change the team names here to what the actual names are)
        v.Character.Torso.CFrame = game.TeleportPart.CFrame -- Replace game.TeleportPart with the location of the brick you're teleporting the players to.
    end
end

Hope I helped! :)

Ad

Answer this question