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

How to make a change team block that cannot be spawned on?

Asked by
iHavoc101 127
4 years ago

I want to make a change team block, but you cannot spawn on it. It changes when you touch it

1 answer

Log in to vote
1
Answered by
VitroxVox 884 Moderation Voter
4 years ago

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.

0
Ok, testing iHavoc101 127 — 4y
0
Thanks, it works! iHavoc101 127 — 4y
0
Great, glad to help! VitroxVox 884 — 4y
Ad

Answer this question