I want to make a change team block, but you cannot spawn on it. It changes when you touch it
✓ ANSWER ACCEPTED
How to make a change team block that cannot be spawned on?
1 answer
✓ Accepted answer
Hello there i think i know what you're looking for, be sure to put this script in the part you want them to touch so they change teams! And be sure to change the setting too.
local Team = game:GetService("Teams")["TeamName"] -- chane this to the team's name.
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
game.Players[hit.Parent.Name].Team = Team
end
end)
If it worked please like,accept. If not comment why and i'll help.
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
Ok, testing
Thanks, it works!
Great, glad to help!