I have a screengui i want it to dissapear after clicking a textbutton without using destroy() I've tried setting the Enabled to false but it doesnt work through script
Begin = script.Parent --this is the button-- Begin.MouseButton1Up:Connect(function() game.StarterGui.titlescreen.Enabled = false -- this is the screengui-- end)
When you start the game, all GUI objects get moved to the client's 'PlayerGui'.
To fix this put a local script inside of the 'Button' and write the following code:
local Begin = script.Parent Begin.MouseButton1Click:Connect(function() Begin.Parent.Enabled = false end)
If it works, make this the solution.
i usually use GUI.Visible = false
if anyone has a better way