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

How do I connect a team with a spawn?

Asked by
l7mf 2
4 years ago

I've tried putting the same color to it but it won't work lol. So I wanted to ask how to connect the team e. g. Passenger to a spawn.

0
If you mean on touch it changed spawn it should be in the spawn settings fighterkirbyzx 102 — 4y

2 answers

Log in to vote
0
Answered by 4 years ago

Colors do not work, but you can add it for decoration. Instead, try something like this:

local t = game:GetService("Teams").YourTeamName --Rename "YourTeamName" with the team's name
t.AutoAssignable = false

function touch(hit)
game.Players:GetPlayerFromCharacter(hit.Parent).Team = t
end

script.Parent.Touched:Connect(touch)

Try it!

Ad
Log in to vote
0
Answered by
Tixabel 19
4 years ago

Ok, from what i understand you want to connect Teams with a spawn location.

This is simple, so click on your spawn location and check for the properties Neutral and AllowTeamChangeOnTouch and turn them all off.

Neutral - means that all players spawn on that location no matter the team they are in * AllowTeamOnTouch - *means that if you touch another spawn location with a different team then you would change teams with that spawn location.

Then check for the property Team color from the spawn location and remember it, then go to the team folder, and from the child Team look for the property TeamColor and change it to the same as the spawn location Team color. Now when you play you should end up in on one of the teams.

I hope this helped, if you are still unsure you can ask me. ????

0
So passenger team color would be connected to the spawn location team color Tixabel 19 — 4y

Answer this question