EDIT #2
Your script should work as long as the
script.Parent.Parent:Remove()
is in the correct form.
I would recommend using the visibility setting in your frame or button
in that case your script would be
function close()
script.Parent.Parent.Visible = false
end
script.Parent.MouseButton1Click:connect(close)
You can also make a button that opens and closes what you choose using if and else
function click()
if script.Parent.Parent.Visible == true then
script.Parent.Parent.Visible = false
else script.Parent.Parent.Visible = true
end
end
script.Parent.MouseButton1Click:connect(click)
Please accept answer if this helped.
Let me know if there are any bugs that I need to fix first.
THANKS!
2 comments
Thanks, but the issue was that FilteringEnabled was on. Plus, I need the GUI to be remved, because it is copied into the player's GUI and would appear again if he/she touched the brick
oh, as long as your problem is fixed