Issues with SetCoreGuiEnabled


I wanted to use SetCoreGuiEnabled() but it’s not working?

The first attempt:

StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false)

For some reason it didn’t work

The second attempt:

I tried hooking up a Pcall if that helps.

didn’t work either.

Some info:

This is a LocalScript.
The ScreenGui is Parented to StarterGui

It is hooked by a Humanoid.Died function.
This function does fire.

I pasted this in and it worked fine for me. You said the function does fire, but does it get past the disable line? Try putting a print statement after the line that disables CoreGUIs.


Yes it still does fire.

I’m not really sure what the problem is, since that line of code works for me. I wrote my own disable GUIs and even after copy pasting that line it still worked. Perhaps there’s another script interfering? If not, I’m not really sure if I can help. You could try just moving the disable GUIs on death code into a new place and then testing if it works, or sending the code for me to debug.

If by “not working” you mean it not disabling the menu button then let me inform you that this is intended behavior. Obviously, Roblox isn’t giving developers direct access to locking players into their games.

I have tried making another LocalScript and pasting that code in. Still didn’t work. I guess I haven’t really tried it in another place. I will try that asap.

I mean’t it isn’t removing the leaderboards, emotes or player leaderboard which I believe is what it is intending to.

Seems like doing it on a new place does work.

Is there any specific code(s) that might interfere with this line of code?

Really the only thing I can think of is another connection that enables all core guis. Try doing ctrl+shift+f to search for all instances of a string, then type :SetCoreGuiEnabled and press enter. This may find any interfering code.

Seems like it did work, I assume it’s cause I had a LocalScript that had

StarterGui:SetCoreGuiEnabled(Enum.CoreGuiAll, false)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.