put script below directly inside the part
TeamColor = BrickColor.new("Bright blue") ---For this script to work, i need --the exact color of the team that may touch it only replace the stuff inside ""
function touched(hit)
plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if plr.TeamColor == TeamColor then
-- code here
else return
end
end
script.Parent.Touched:connect(touched) |