trying to make a border-like game, and i am trying to create a certain point of the map where immigrants turn to citizens, but i cant do it without changing the Patrol team to citizens here is my code so far
tm = script.Parent
function onTouched(hit)
local h = hit.Parent:FindFirstChild("Humanoid")
if h ~= nil then
local n = hit.Parent
local p = game.Players:FindFirstChild(""..n.Name.."")
if p ~= nil and p.TeamColor == "Bright red" then
p.TeamColor = tm.BrickColor
end
end
end
script.Parent.Touched:connect(onTouched)

1 comment
Thanks