So I have this button script:
local owner = script.Parent.Parent.Parent.Parent:WaitForChild("Owner")
function onClicked(playerthatclicked)
if playerthatclicked == owner.Value then
local Model = script.Parent.Parent
Model.OwnerOnlyDoor.BrickColor = BrickColor.new("Really red")
Model.OwnerOnlyDoor2.BrickColor = BrickColor.new("Really red")
Model.OwnerOnlyDoor3.BrickColor = BrickColor.new("Really red")
Model.OwnerOnlyDoor4.BrickColor = BrickColor.new("Really red")
end
end
script.Parent.closeclick.MouseClick:connect(onClicked)
The almighty Goulstem helped me edit this script to get it to this. There is still the same problem though. Since I want the owner to be the only one able to open/close the OwnerOnlyDoor for the tycoon I added a playerthatclicked script to it. This changed nothing all it did was cause absolutely nothing to happen in the output in-game and in studio even when the owner is the one clicking it. Please help!

1 comment
Did you define playerthatclicked variable?