Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Owner Tycoon door, ideas? [SOLVED]

Asked by 9 years ago
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

Answer this question