So im tryna reduce lag and all but I was wondering if destroying a gui is better than Setting the gui To False
for example a frame you'd do
Frame:Destroy() or Frame.Visible = false
Try setting the GUI Gui.Enabled == false
this will prevent the GUI from doing anything. But if its scripts that are causing lag, try script.Disabled = true
. Hope this helps you in solving lag!
Destroying a GUI removes its existence thus is not requiring any resources to have scripts in it run for it.
Setting a GUI invisible only sets it invisible so scripts will run in it normally as if it was visible.
What is the answer? It's dependent on what local scripts are doing in your GUI, you can disable the GUI, disable scripts, destroy it, and whatever you want to it but it is better to destroy the GUI otherwise if you do not care about making it visible again, but if you want to use it again then you'd have to just disable the GUI or tick off visibility before enabling it (GUI/Visibility) again.