function onTouched(hit) local check = hit.Parent:FindFirstChild("Humanoid") if check ~= nil then local plr = game.Players:FindFirstChild(hit.Parent.Name) plr.TeamColor.BrickColor = BrickColor.new("Bright Blue") script.Parent.Parent.Name = "Owner is" ..hit.Parent.Name .. "" end end script.Parent.Touched:connect(onTouched)
I am making a tycoon from scratch and I'm having assigning a player to team when he touches a tycoon door. First, thanks for looking at my question. Second, any ideas/tips are very appreciated. I do get a error and here it is:
16:53:17.986 - BrickColor cannot be assigned to 16:53:17.987 - Script 'Workspace.Become Owner.Head.Script', Line 5 16:53:17.988 - Stack End