I am trying to make a script that will unlock a button to teleport. I unselected selectable under property’s and I could still select it. When you click the button the buy button and the teleport button does disappear
If you want my code here it is
function OnClicked()
script.Parent.Parent.Parent.Parent:Remove()
script.Parent.Parent.Parent.Parent.Parent.Selectable = true
end
script.Parent.MouseButton1Down:connect(OnClicked)
I believe the correct property is button.Active. You can also just make visible false or in the mouse click event, check whether the player Is supposed to be able to click it using a if statement
You just need to change the .Selectable property to .Active property as this is the correct terminology.
Your script should look like this:
function OnClicked()
script.Parent.Parent.Parent.Parent:Remove()
script.Parent.Parent.Parent.Parent.Parent.Active = true
end
script.Parent.MouseButton1Down:connect(OnClicked)