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

How can you make it so everyone spawns on one team even though there are multiple spawns?

Asked by
wjs3456 90
10 years ago

Okay so for example is there anyway to make it so when you enter the game you always spawn on the red team but on death you spawn on the green team. Something like that. Also, I don't mean to sound like this is a request. Thanks if you can help.

2 answers

Log in to vote
3
Answered by
M39a9am3R 3210 Moderation Voter Community Moderator
10 years ago

Unfortunately, it is a request, but I can help.

Just set all the teams but the red team's property to Not Auto Assignable.

And to change a person's team from red to green on death place this script in workspace or server script service;

game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(c)
c:WaitForChild("Humanoid").Died:connect(function()
p.TeamColor = BrickColor.new("Bright green") --Or what ever team color it is.
end)
end)
end)
0
Thanks :) wjs3456 90 — 10y
Ad
Log in to vote
0
Answered by
BlueTaslem 18071 Moderation Voter Administrator Community Moderator Super Administrator
10 years ago

Just switch their team to Green on death.

Humanoid Died Event in conjunction with CharacterAdded of Player or ChildAdded or DescendantAdded of Workspace.


Or, easier to code but messier (since the leaderboard will not be useful): switch a player's team to Green immediately after they spawn, so their next spawn will bring them their.

Answer this question