startergui:SetCoreGuiEnabled not working

I’m currently using this script:

local startergui = game:GetService('StarterGui')
	repeat startergui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList,false) wait(0.5) until startergui:GetCoreGuiEnabled(Enum.CoreGuiType.PlayerList) == false
	repeat startergui:SetCoreGuiEnabled(Enum.CoreGuiType.Health,false) wait(0.5) until startergui:GetCoreGuiEnabled(Enum.CoreGuiType.Health) == false

But, it’s not disabling PlayerList and Health.

Anything I can do? (Seems like another script is overwriting it but I’m unable to locate it.)

3 Likes
local StarterGui = game:GetService("StarterGui")
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false, Enum.CoreGuiType.Health, false)

do this!

2 Likes

just ctrl + shift + F and input “PlayerList”

1 Like

that would disable chat as well, correct?

Updated, but yes, if it’s set to All, it will disable all the main gui’s, however, I changed it to tackle the PlayerList only!

1 Like

I did that and i pressed shift+f5

When I came into the game it showed me this:

Skjermbilde 2023-08-02 022425
Skjermbilde 2023-08-02 022405

Which in my head means that doing everything else here did not work

3 Likes

Dunno why you’re asking it to repeat, the only time where I’ve experienced it act up and not work is in studio, and studio only, you should just try this here, I know for a fact this should work:

local StarterGui = game:GetService("StarterGui")
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Health, false)
2 Likes

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