Okay I am experimenting with GUI's and I'm trying to hide or destroy a GUI button when clicked. I've made this code but it doesn't work.
function onClick() game.Players.LocalPlayer.PlayerGui.ScreenGui:Destroy() end LocalScript.Parent.MouseButton1Click:connect(onClick)
That's because it's not "LocalScript" even if it is in a local script, It's still just "script"
function onClick() script.Parent:remove() end script.Parent.MouseButton1Click:connect(onClick)
It is not a Even if it is a local script you still use script. Also, try using regular scripts.