game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
I want to remove all the core parts ( playerlist,game settings,health) everything.
Just try this:
local StarterGui = game:GetService('StarterGui') StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
Maybe you need to call StarterGui as a service for it to work?
Please don't downvote if it didn't help. I am trying to help, and was simply suggesting an alternative.