I am trying to make someone receive a team once they spawn in a lobby of a game and once they enter a portal. Is there any way I can change someone's team when they touch a specific part without killing the player?
✓ ANSWER ACCEPTED
How do I change a player's team when they touch a part?
2 answers
✓ Accepted answer
part.Touched:Connect(function(hit)
local player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent)
player.Team = game.Teams.TEAMNAMEGOESHERE
end
end)
10 comments
1
Thank you for answering, but when I touch the part, the following error shows:
0
?
1
Hit is not a valid member of part
0
fixed
1
Wait a lil'...
0
wait lemme edit 1 more time
0
Alr.
0
there now trt
1
:o Thanks.
0
ty for the rep <3
You could make the portal a spawn point and go into properties and make it so player doesn't spawn there but it changes there team on touch. For example place a tp brick and the spawn point make sure there in each other so when the player spawns they tp.
1 comment
0
Can you please give a list of the properties I have to change for me? For me, the properties are kind of confusing. Sorry.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
edited answer
now try again