How come this code won’t work? I loop through all the screen gui’s in the playergui and put Enabled to false, however it doesn’t seem to work and I don’t know why? This code is for a loading screen and I want to disable all other UI elements while its loading.
What is the code prior to the snippet you provided? Did you get anything in your output, too? Are there any scripts interfering with this one?
Edit: Try adding a print statement in that snippet of code. See if the script is detecting the GUIs. Maybe the GUIs have not loaded before you called PlayerGui:GetChildren().
Sorry I just got off but it’s a local script under replicatedfirst and in it is a screen gui called loading screen that I then clone into the starter gui. In starter gui there’s only a screen gui with the money and kills and wins
Is there a reason you are disabling GUI’s rather than just making the loading screen have a higher ZIndexs so that it renders above all other elements?
EDIT: If you use multiple ScreenGUIs make sure you change the ScreenGUIs ZIndexBehavior to Global instead of Sibling.
Wait sorry what do you mean by that? where is the zindexes property? EDIT: Oh I found it, but the problem is that my loading screen is in a separate gui than the others so it doesn’t work