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

How to make people spawn in the same team when there are multiple teams?

Asked by 4 years ago

for example, in my game when multiple people join they all spawn on different teams and not the first level like i want them to. all the spawns are not neutral and are change team when touched. can somebody please help?

2 answers

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

here is how you change the team.

player.Team = *team*

if you want to change it to a random team when they join the game, do this:

local Teams = game:WaitForChild("Teams")
local TC = Teams:GetChildren()
game.Players.PlayerAdded:Connect(function(player)
    player.Team = TC[math.random(1, #TC)]
end

and uhhhh yeah! I hope that helps. If you need more help on this topic, feel free to message me on Roblox or dm me @BlobMaster#8156.

Edit log: Changed "." to "," in code block 2, line 4

0
Heavenly this was not exactly what i was looking for because this is an obby so people have to spawn all on the first stage venprince -2 — 4y
Ad
Log in to vote
0
Answered by 4 years ago

Just go to the team properties by clicking the team and clicking the properties tab. Then you make it so that all teams except the one you want have random choosing disabled.

0
this is an obby no team can be neutral venprince -2 — 4y

Answer this question