So I’ve been making these gui open thingies and the close button on the first one works fine but the close button on the second one which is exactly the same doesn’t work for some reason.
As you can see the first close button works but the second one doesn’t.
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.Visible = false
print("Set to false.")
end)
First off, try it in Roblox client. Sometimes Roblox errors for no reason. Second, let me know if it prints Set to false. , or even better, works then.
I never tried that script if its the same thing as one, well i did when i was new to scripting. But i only know thing when its just lots of script to do it.
If you close one gui with a server script. You won’t be able to close the the ui using client script because it’s already close to client but not in the server. And also in the first sentence i said,
I use while do and for do to get each buttons and put a function with it.
And to @47347cool you don’t really need to use a event when closing the ui because when you do, the ui is disabled in server, instead in the client.