How can I make it so when a player that is on a team steps on a block and then it changes color? Ex: Player on red team steps on a block, it turns red. Here is what I have right now:
function Change(hit)
local h=hit.Parent:FindFirstChild("Humanoid")
if h~=nil then
script.Parent.BrickColor = BrickColor.new("Team color")
end
end
script.Parent.Touched:connect(Change)

1 comment
Thanks!