So, I was creating a team changing door, nothing much. It works but for some reason, I keep getting an error…
script.Parent.Touched:Connect(function(hit)
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if plr.TeamColor ~= BrickColor.new("Pink") then
plr.TeamColor = BrickColor.new("Pink")
end
end)
Why is this?