Simply what I tried:
hit.Parent.TeamColor = BrickColor.new("Institutional white")
I know the problem is in the BrickColor.new("Institutional white")
but I don't know what to put instead. Thanks in advance for your help!
hit.Parent, I believe returns the Character. So it would need to be:
hit.Parent.Parent.TeamColor=BrickColor.new("Institutional white")
If it isn't that it would be
local p=game.Players:GetPlayerFromCharacter(hit.Parent) p.TeamColor=BrickColor.new("Institutional white")
If it is something you can hit with a hat I suggest you use this.
local h=hit if hit:IsA("Part") then hit.Parent.Parent.TeamColor=BrickColor.new("Institutional white") end