SpawnLocation
*Ce contenu est traduit en utilisant l'IA (Beta) et peut contenir des erreurs. Pour consulter cette page en anglais, clique ici.
Les emplacements d'apparition, ou « apparitions », déterminent où un Player réapparaît lorsqu'il meurt.Ils peuvent être configurés pour permettre à certains joueurs seulement d'utiliser chaque régénération, apparition, en utilisant Teams .Ils contrôlent également comment ForceFields sont configurés pour les nouveaux joueurs générés.
Les emplacements d'apparition peuvent être utilisés comme points de contrôle, comme dans un parcours d'obstacles, en utilisant la propriété SpawnLocation.AllowTeamChangeOnTouch, afin que lorsqu'un joueur le touche, il change d'équipe pour l'équipe de SpawnLocation.Dans ce cas, seule la première doit être réglée sur vrai, sinon les joueurs ne commenceront pas au premier point de contrôle.
Notez si un SpawnLocation est ajouté à la Workspace dans Studio avec SpawnLocation.Neutral réglé sur false, une équipe sera créée correspondant à SpawnLocation.TeamColor s'il n'existe pas déjà.Ce comportement ne se produit pas lorsque des spawns sont créés dans le jeu en utilisant un Script ou si les propriétés de SpawnLocation sont modifiées après avoir déjà été ajoutées.Il est recommandé que les développeurs configurent toujours leurs équipes manuellement et ne comptent pas sur ce comportement.
Génération de règles
Il y a plusieurs règles qui entrent en jeu pour un lieu d'apparition donné lorsqu'un joueur réapparaît :
- Lorsque SpawnLocation.Neutral est réglé sur false uniquement Players avec Player.TeamColor correspondant à SpawnLocation.TeamColor réapparaîtra au-dessus
- Lorsque SpawnLocation.Neutral est réglé sur vrai, n'importe quel joueur peut apparaître au-dessus d'elle indépendamment de SpawnLocation.TeamColor
- Si plusieurs éclosions éligibles sont disponibles pour un Player, une éclosion aléatoire sera choisie
- Les joueurs apparaîtront à différents endroits au-dessus d'un lieu d'apparition, mais actuellement, ils peuvent encore apparaître au-dessus les uns des autres si ils apparaissent immédiatement après l'un et l'autre
Voir aussi :
- Si vous souhaitez configurer le temps qu'il faut pour qu'un joueur réapparaisse, consultez la propriété RespawnTime
Échantillons de code
This sample demonstrates how SpawnLocations can be used to make a checkpoint system. Typically this would be done Studio and not in Lua, but this example serves as a comprehensive example of what Team and SpawnLocation properties need to be used to achieve this setup.
local Teams = game:GetService("Teams")
-- create start team (AutoAssignable = true)
local startTeam = Instance.new("Team")
startTeam.Name = "Start"
startTeam.AutoAssignable = true
startTeam.TeamColor = BrickColor.new("White")
startTeam.Parent = Teams
-- create checkpoint teams (Autoassignable = false), ensuring all TeamColors are unique
local team1 = Instance.new("Team")
team1.Name = "Checkpoint 1"
team1.AutoAssignable = false
team1.TeamColor = BrickColor.new("Bright blue")
team1.Parent = Teams
local team2 = Instance.new("Team")
team2.Name = "Checkpoint 2"
team2.AutoAssignable = false
team2.TeamColor = BrickColor.new("Bright green")
team2.Parent = Teams
local team3 = Instance.new("Team")
team3.Name = "Checkpoint 2"
team3.AutoAssignable = false
team3.TeamColor = BrickColor.new("Bright red")
team3.Parent = Teams
-- create spawns
local startSpawn = Instance.new("SpawnLocation")
startSpawn.Anchored = true
startSpawn.Size = Vector3.new(5, 1, 5)
startSpawn.Neutral = false
startSpawn.AllowTeamChangeOnTouch = false
startSpawn.TeamColor = startTeam.TeamColor
startSpawn.BrickColor = startTeam.TeamColor
startSpawn.Parent = game.Workspace
local team1Spawn = Instance.new("SpawnLocation")
team1Spawn.Anchored = true
team1Spawn.Size = Vector3.new(5, 1, 5)
team1Spawn.Neutral = false
team1Spawn.AllowTeamChangeOnTouch = true
team1Spawn.TeamColor = team1.TeamColor
team1Spawn.BrickColor = team1.TeamColor
team1Spawn.Parent = game.Workspace
local team2Spawn = Instance.new("SpawnLocation")
team2Spawn.Anchored = true
team2Spawn.Size = Vector3.new(5, 1, 5)
team2Spawn.Neutral = false
team2Spawn.AllowTeamChangeOnTouch = true
team2Spawn.TeamColor = team2.TeamColor
team2Spawn.BrickColor = team2.TeamColor
team2Spawn.Parent = game.Workspace
local team3Spawn = Instance.new("SpawnLocation")
team3Spawn.Anchored = true
team3Spawn.Size = Vector3.new(5, 1, 5)
team3Spawn.Neutral = false
team3Spawn.AllowTeamChangeOnTouch = true
team3Spawn.TeamColor = team3.TeamColor
team3Spawn.BrickColor = team3.TeamColor
team3Spawn.Parent = game.Workspace
-- position spawns
startSpawn.CFrame = CFrame.new(0, 0.5, 0)
team1Spawn.CFrame = CFrame.new(10, 0.5, 0)
team2Spawn.CFrame = CFrame.new(20, 0.5, 0)
team3Spawn.CFrame = CFrame.new(30, 0.5, 0)
Résumé
Propriétés
Permet à un Player de rejoindre l'équipe en touchant le SpawnLocation.Lorsqu'il est défini sur vrai, si un caractère Player entre en contact avec le SpawnLocation, le Player.TeamColor du joueur sera défini sur SpawnLocation.TeamColor.
La durée, en secondes, pendant laquelle un ForceField sera appliqué à un Player personnage générant à cet endroit SpawnLocation .Si la durée est zéro, le ForceField n'est jamais créé et ne déclenchera pas les événements Instance.DescendantAdded ou Instance.ChildAdded.
Définit si le SpawnLocation est activé ou non.Lorsque les joueurs désactivés ne peuvent pas apparaître à la SpawnLocation et que la fonctionnalité AllowTeamChangeOnTouch est désactivée.
Si oui ou non un SpawnLocation est affilié à une équipe spécifique.Cela signifie que tout Player , de tout Team , peut s'y générer si cette propriété est définie sur vrai.
Définit à quelle équipe le SpawnLocation est affilié.Si la propriété SpawnLocation.Neutral est fausse, seul Players avec le même Player.TeamColor que la couleur d'équipe de la régénération, apparitionsera en mesure de s'y générer.
Définit la forme globale de l'objet.
Détermine si une partie est immobile par la physique.
La vitesse angulaire de l'assemblage de la pièce.
Le centre de masse de l'assemblage de la partie dans l'espace mondial.
La vitesse linéaire de l'assemblage de la pièce.
La masse totale de l'assemblage de la partie.
Une référence à la partie racine de l'assemblage.
Détermine si la partie interagira physiquement avec la simulation audio, similaire à CastShadow pour l'éclairage.
Détermine le type de surface pour le dos d'une pièce.
Détermine le type de surface pour le côté inférieur d'une pièce.
Détermine la couleur d'une partie.
Détermine la position et l'orientation du BasePart dans le monde.
Détermine si une partie peut entrer en collision avec d'autres parties.
Détermine si la partie est prise en compte lors des opérations de requête spatiale.
Détermine si Touched et TouchEnded événements se déclenhent sur la partie.
Détermine si oui ou non une partie lance une ombre.
Décrit la position mondiale dans laquelle le centre de masse d'une partie est situé.
Détermine le nom du groupe de collision d'une partie.
Détermine la couleur d'une partie.
Indique les propriétés physiques actuelles de la pièce.
Détermine plusieurs propriétés physiques d'une partie.
Utilisé pour activer ou désactiver les forces aérodynamiques sur les parties et les assemblages.
La taille physique réelle du BasePart telle que perçue par le moteur de physique.
Détermine le type de surface pour le visage avant d'une partie.
Détermine le type de surface pour le côté gauche d'une pièce.
Détermine un multiplicateur pour BasePart.Transparency qui n'est visible que pour le client local.
Détermine si une partie est sélectionnable dans Studio.
Décrit la masse de la partie, le produit de sa densité et de son volume.
Détermine si la partie contribue à la masse totale ou à l'inertie de son corps rigide.
Détermine la texture et les propriétés physiques par défaut d'une pièce.
Le nom de MaterialVariant.
Décrit la rotation de la partie dans le monde.
Spécifie le décalage du pivot de la partie par rapport à son CFrame .
Décrit la position de la partie dans le monde.
Temps écoulé depuis la dernière mise à jour physique enregistrée.
Détermine à quel point une partie reflète la skybox.
Décrit le plus petit changement de taille autorisé par la méthode Resize().
Décrit les visages sur lesquels une partie peut être redimensionnée.
Détermine le type de surface pour le côté droit d'une pièce.
La règle principale pour déterminer la partie racine d'une assemblée.
La rotation de la pièce en degrés pour les trois axes.
Détermine les dimensions d'une pièce (longueur, largeur, hauteur).
Détermine le type de surface pour le haut du visage d'une pièce.
Détermine à quel point une partie peut être vue à travers (l'inverse de l'opacité de la partie).
Méthodes
Méthodes hérités de BasePartAppliquer un impulsion angulaire à l'assemblage.
Appliquez un impulsion à l'assemblage à l'assemblage de center of mass .
Appliquer un impulsion à l'assemblage à une position spécifiée.
Renvoie si les parties peuvent se heurter les unes aux autres.
Vérifie si vous pouvez définir la propriété réseau d'une partie.
Retourne une table de parties connectées à l'objet par tout type de articulationrigide.
Renvoie tous les jointures ou contraintes qui sont connectées à cette partie.
Renvoie la valeur de la propriété Mass.
Renvoie le joueur actuel qui est le propriétaire du réseau de cette partie, ou nil en cas du serveur.
Renvoie true si le moteur de jeu décide automatiquement du propriétaire du réseau pour cette partie.
Renvoie la partie de base d'une assemblage de parties.
Renvoie une table de toutes les BasePart.CanCollide parties vraies qui se chevauchent avec cette partie.
Renvoie la vitesse linéaire de l'assemblage de la pièce à la position donnée par rapport à cette pièce.
Renvoie true si l'objet est connecté à une partie qui le maintiendra en place (par exemple, une partie Anchored), sinon renvoie false.
Change la taille d'un objet tout comme l'utilisation de l'outil de redimensionnement de Studio.
Définit le joueur donné comme propriétaire du réseau pour ceci et toutes les parties connectées.
Permet au moteur de jeu de décider dynamiquement qui gérera la physique de la partie (l'un des clients ou le serveur).
- IntersectAsync(parts : Instances,collisionfidelity : Enum.CollisionFidelity,renderFidelity : Enum.RenderFidelity):Instance
Crée une nouvelle IntersectOperation à partir de la géométrie chevauchante de la pièce et des autres parties dans l'matricedonné.
- SubtractAsync(parts : Instances,collisionfidelity : Enum.CollisionFidelity,renderFidelity : Enum.RenderFidelity):Instance
Crée un nouveau UnionOperation à partir de la partie, moins la géométrie occupée par les parties dans l'matricedonné.
- UnionAsync(parts : Instances,collisionfidelity : Enum.CollisionFidelity,renderFidelity : Enum.RenderFidelity):Instance
Crée une nouvelle UnionOperation de la partie, plus la géométrie occupée par les parties dans l'matricedonné.
Obtient le pivot d'un PVInstance .
Transforme le PVInstance ainsi que tous ses descendants PVInstances de sorte que le pivot est désormais situé au point spécifié CFrame.
Évènements
Évènements hérités de BasePartS'enflamme lorsqu'une partie cesse de toucher une autre partie en raison d'un mouvement physique.
S'enflamme lorsqu'une partie touche une autre partie en raison d'un mouvement physique.
Propriétés
AllowTeamChangeOnTouch
Permet à un Player de rejoindre l'équipe en touchant le SpawnLocation.Lorsqu'il est défini sur vrai, si un caractère Player entre en contact avec le SpawnLocation, le Player.TeamColor du joueur sera défini sur SpawnLocation.TeamColor.Player.Neutral sera également réglé sur SpawnLocation.Neutral lors du contacter, ce qui signifie qu'un joueur peut également devenir neutre en touchant un lieu de production.
Cela ne fonctionnera pas lorsque SpawnLocation.Enabled est réglé sur false.
Faire des points de contrôle
Cette fonction est souvent utilisée pour créer des points de contrôle dans des courses d'obstacles ou des jeux similaires.
Échantillons de code
This sample demonstrates how SpawnLocations can be used to make a checkpoint system. Typically this would be done Studio and not in Lua, but this example serves as a comprehensive example of what Team and SpawnLocation properties need to be used to achieve this setup.
local Teams = game:GetService("Teams")
-- create start team (AutoAssignable = true)
local startTeam = Instance.new("Team")
startTeam.Name = "Start"
startTeam.AutoAssignable = true
startTeam.TeamColor = BrickColor.new("White")
startTeam.Parent = Teams
-- create checkpoint teams (Autoassignable = false), ensuring all TeamColors are unique
local team1 = Instance.new("Team")
team1.Name = "Checkpoint 1"
team1.AutoAssignable = false
team1.TeamColor = BrickColor.new("Bright blue")
team1.Parent = Teams
local team2 = Instance.new("Team")
team2.Name = "Checkpoint 2"
team2.AutoAssignable = false
team2.TeamColor = BrickColor.new("Bright green")
team2.Parent = Teams
local team3 = Instance.new("Team")
team3.Name = "Checkpoint 2"
team3.AutoAssignable = false
team3.TeamColor = BrickColor.new("Bright red")
team3.Parent = Teams
-- create spawns
local startSpawn = Instance.new("SpawnLocation")
startSpawn.Anchored = true
startSpawn.Size = Vector3.new(5, 1, 5)
startSpawn.Neutral = false
startSpawn.AllowTeamChangeOnTouch = false
startSpawn.TeamColor = startTeam.TeamColor
startSpawn.BrickColor = startTeam.TeamColor
startSpawn.Parent = game.Workspace
local team1Spawn = Instance.new("SpawnLocation")
team1Spawn.Anchored = true
team1Spawn.Size = Vector3.new(5, 1, 5)
team1Spawn.Neutral = false
team1Spawn.AllowTeamChangeOnTouch = true
team1Spawn.TeamColor = team1.TeamColor
team1Spawn.BrickColor = team1.TeamColor
team1Spawn.Parent = game.Workspace
local team2Spawn = Instance.new("SpawnLocation")
team2Spawn.Anchored = true
team2Spawn.Size = Vector3.new(5, 1, 5)
team2Spawn.Neutral = false
team2Spawn.AllowTeamChangeOnTouch = true
team2Spawn.TeamColor = team2.TeamColor
team2Spawn.BrickColor = team2.TeamColor
team2Spawn.Parent = game.Workspace
local team3Spawn = Instance.new("SpawnLocation")
team3Spawn.Anchored = true
team3Spawn.Size = Vector3.new(5, 1, 5)
team3Spawn.Neutral = false
team3Spawn.AllowTeamChangeOnTouch = true
team3Spawn.TeamColor = team3.TeamColor
team3Spawn.BrickColor = team3.TeamColor
team3Spawn.Parent = game.Workspace
-- position spawns
startSpawn.CFrame = CFrame.new(0, 0.5, 0)
team1Spawn.CFrame = CFrame.new(10, 0.5, 0)
team2Spawn.CFrame = CFrame.new(20, 0.5, 0)
team3Spawn.CFrame = CFrame.new(30, 0.5, 0)
Duration
La durée, en secondes, pendant laquelle un ForceField sera appliqué à un Player personnage générant à cet endroit SpawnLocation .Si la durée est zéro, le ForceField n'est jamais créé et ne déclenchera pas les événements Instance.DescendantAdded ou Instance.ChildAdded.
Cette valeur par défaut de cette propriété est de 10 secondes.
La fonction de durée permet aux développeurs de donner facilement une protection Players contre le "spawn killing" qui peut être une expérience frustrante pour les joueurs.Note, ForceFields ne protégera les utilisateurs que des Explosions armes qui utilisent Humanoid:TakeDamage() pour infliger des dommages ou autrement vérifier un ForceField .
Échantillons de code
This sample will create a neutral SpawnLocation in the Workspace that'll give players spawning a ForceField for 20 seconds.
local spawnLocation = Instance.new("SpawnLocation")
spawnLocation.Anchored = true
spawnLocation.Size = Vector3.new(5, 1, 5)
spawnLocation.Neutral = true -- anyone can spawn here
spawnLocation.Duration = 20
spawnLocation.Parent = workspace
Enabled
Définit si le SpawnLocation est activé ou non. Lorsqu'il est désactivé, les joueurs ne peuvent pas apparaître dans le SpawnLocation et la fonctionnalité SpawnLocation.AllowTeamChangeOnTouch est désactivée.
Cette propriété fournit la façon la plus pratique d'empêcher Players de se générer à un point d'apparition.
Remarque, bien que le changement d'équipe au touch en utilisant SpawnLocation.AllowTeamChangeOnTouch soit désactivé lorsque Enabled est réglé sur false, d'autres événements touchés en utilisant BasePart.Touched seront toujours lancer.
Échantillons de code
The following sample will create a SpawnLocation in the Workspace that will become semi-transparent when it is disabled.
local spawnLocation = Instance.new("SpawnLocation")
spawnLocation.Anchored = true
spawnLocation.Size = Vector3.new(5, 1, 5)
spawnLocation.Neutral = true -- anyone can spawn here
spawnLocation.Enabled = true
spawnLocation.Parent = workspace
local function onEnabledChanged()
spawnLocation.Transparency = spawnLocation.Enabled and 0 or 0.5
end
spawnLocation:GetPropertyChangedSignal("Enabled"):Connect(onEnabledChanged)
task.wait(5)
spawnLocation.Enabled = false -- transparency = 0.5
Neutral
Si oui ou non un spawn est affilié à une équipe spécifique.Cela signifie que tout Player , de tout Team , peut s'y générer si cette propriété est définie sur vrai.
Si Neutre est défini sur false, seuls les joueurs dont le Player.TeamColor est égal à SpawnLocation.TeamColor peuvent utiliser le SpawnLocation .
Si SpawnLocation.AllowTeamChangeOnTouch est vrai, Player.Neutral sera défini sur cette propriété lors du contact avec le régénération, apparition.
Échantillons de code
This sample demonstrates how SpawnLocations can be used to make a checkpoint system. Typically this would be done Studio and not in Lua, but this example serves as a comprehensive example of what Team and SpawnLocation properties need to be used to achieve this setup.
local Teams = game:GetService("Teams")
-- create start team (AutoAssignable = true)
local startTeam = Instance.new("Team")
startTeam.Name = "Start"
startTeam.AutoAssignable = true
startTeam.TeamColor = BrickColor.new("White")
startTeam.Parent = Teams
-- create checkpoint teams (Autoassignable = false), ensuring all TeamColors are unique
local team1 = Instance.new("Team")
team1.Name = "Checkpoint 1"
team1.AutoAssignable = false
team1.TeamColor = BrickColor.new("Bright blue")
team1.Parent = Teams
local team2 = Instance.new("Team")
team2.Name = "Checkpoint 2"
team2.AutoAssignable = false
team2.TeamColor = BrickColor.new("Bright green")
team2.Parent = Teams
local team3 = Instance.new("Team")
team3.Name = "Checkpoint 2"
team3.AutoAssignable = false
team3.TeamColor = BrickColor.new("Bright red")
team3.Parent = Teams
-- create spawns
local startSpawn = Instance.new("SpawnLocation")
startSpawn.Anchored = true
startSpawn.Size = Vector3.new(5, 1, 5)
startSpawn.Neutral = false
startSpawn.AllowTeamChangeOnTouch = false
startSpawn.TeamColor = startTeam.TeamColor
startSpawn.BrickColor = startTeam.TeamColor
startSpawn.Parent = game.Workspace
local team1Spawn = Instance.new("SpawnLocation")
team1Spawn.Anchored = true
team1Spawn.Size = Vector3.new(5, 1, 5)
team1Spawn.Neutral = false
team1Spawn.AllowTeamChangeOnTouch = true
team1Spawn.TeamColor = team1.TeamColor
team1Spawn.BrickColor = team1.TeamColor
team1Spawn.Parent = game.Workspace
local team2Spawn = Instance.new("SpawnLocation")
team2Spawn.Anchored = true
team2Spawn.Size = Vector3.new(5, 1, 5)
team2Spawn.Neutral = false
team2Spawn.AllowTeamChangeOnTouch = true
team2Spawn.TeamColor = team2.TeamColor
team2Spawn.BrickColor = team2.TeamColor
team2Spawn.Parent = game.Workspace
local team3Spawn = Instance.new("SpawnLocation")
team3Spawn.Anchored = true
team3Spawn.Size = Vector3.new(5, 1, 5)
team3Spawn.Neutral = false
team3Spawn.AllowTeamChangeOnTouch = true
team3Spawn.TeamColor = team3.TeamColor
team3Spawn.BrickColor = team3.TeamColor
team3Spawn.Parent = game.Workspace
-- position spawns
startSpawn.CFrame = CFrame.new(0, 0.5, 0)
team1Spawn.CFrame = CFrame.new(10, 0.5, 0)
team2Spawn.CFrame = CFrame.new(20, 0.5, 0)
team3Spawn.CFrame = CFrame.new(30, 0.5, 0)
TeamColor
La propriété TeamColor définit à quelle équipe le SpawnLocation est affilié.Si la propriété SpawnLocation.Neutral est fausse, seul Players avec le même Player.TeamColor que la couleur d'équipe de la régénération, apparitionsera en mesure de s'y générer.
Si SpawnLocation.AllowTeamChangeOnTouch est vrai, Player.Neutral sera défini sur cette propriété lors du contact avec le régénération, apparition.
Échantillons de code
This sample demonstrates how SpawnLocations can be used to make a checkpoint system. Typically this would be done Studio and not in Lua, but this example serves as a comprehensive example of what Team and SpawnLocation properties need to be used to achieve this setup.
local Teams = game:GetService("Teams")
-- create start team (AutoAssignable = true)
local startTeam = Instance.new("Team")
startTeam.Name = "Start"
startTeam.AutoAssignable = true
startTeam.TeamColor = BrickColor.new("White")
startTeam.Parent = Teams
-- create checkpoint teams (Autoassignable = false), ensuring all TeamColors are unique
local team1 = Instance.new("Team")
team1.Name = "Checkpoint 1"
team1.AutoAssignable = false
team1.TeamColor = BrickColor.new("Bright blue")
team1.Parent = Teams
local team2 = Instance.new("Team")
team2.Name = "Checkpoint 2"
team2.AutoAssignable = false
team2.TeamColor = BrickColor.new("Bright green")
team2.Parent = Teams
local team3 = Instance.new("Team")
team3.Name = "Checkpoint 2"
team3.AutoAssignable = false
team3.TeamColor = BrickColor.new("Bright red")
team3.Parent = Teams
-- create spawns
local startSpawn = Instance.new("SpawnLocation")
startSpawn.Anchored = true
startSpawn.Size = Vector3.new(5, 1, 5)
startSpawn.Neutral = false
startSpawn.AllowTeamChangeOnTouch = false
startSpawn.TeamColor = startTeam.TeamColor
startSpawn.BrickColor = startTeam.TeamColor
startSpawn.Parent = game.Workspace
local team1Spawn = Instance.new("SpawnLocation")
team1Spawn.Anchored = true
team1Spawn.Size = Vector3.new(5, 1, 5)
team1Spawn.Neutral = false
team1Spawn.AllowTeamChangeOnTouch = true
team1Spawn.TeamColor = team1.TeamColor
team1Spawn.BrickColor = team1.TeamColor
team1Spawn.Parent = game.Workspace
local team2Spawn = Instance.new("SpawnLocation")
team2Spawn.Anchored = true
team2Spawn.Size = Vector3.new(5, 1, 5)
team2Spawn.Neutral = false
team2Spawn.AllowTeamChangeOnTouch = true
team2Spawn.TeamColor = team2.TeamColor
team2Spawn.BrickColor = team2.TeamColor
team2Spawn.Parent = game.Workspace
local team3Spawn = Instance.new("SpawnLocation")
team3Spawn.Anchored = true
team3Spawn.Size = Vector3.new(5, 1, 5)
team3Spawn.Neutral = false
team3Spawn.AllowTeamChangeOnTouch = true
team3Spawn.TeamColor = team3.TeamColor
team3Spawn.BrickColor = team3.TeamColor
team3Spawn.Parent = game.Workspace
-- position spawns
startSpawn.CFrame = CFrame.new(0, 0.5, 0)
team1Spawn.CFrame = CFrame.new(10, 0.5, 0)
team2Spawn.CFrame = CFrame.new(20, 0.5, 0)
team3Spawn.CFrame = CFrame.new(30, 0.5, 0)