I’ve tried a few scripts like: button = script.Parent
function onClicked(GUI)
script.Parent.Parent.Parent.InfoGUI.Visible = true script.Parent.Parent.Visible = false
end script.Parent.MouseButton1Click:connect(onClicked) but it won’t work, it only makes the frame visible.
Use Lua box, also You didn't explain well so I am not sure if this is what you tough.
1 | local button = script.Parent |
2 | local function onClicked(GUI) |
3 | script.Parent.Parent.Parent.InfoGUI.Visible = true |
4 | button.Visible = false |
5 | end |
6 | script.Parent.MouseButton 1 Click:Connect(onClicked) |