Yes, this is possible.
You can use the SetCoreGuiEnabled method on StarterGui in a LocalScript to remove these elements at your wish. This method takes two parameters, the CoreGui you want to edit and if you want to make it enabled or disabled.
The enum values for each CoreGui is here:
PlayerList - 0
Health - 1
Backpack - 2
Chat - 3
All - 4
If I wanted to disable the Health CoreGui, then this code would work:
game.StarterGui:SetCoreGuiEnabled(1, false)
Because 1 is the enum value for Health and we are setting it's enabled setting to false, meaning it would be disabled.
If I wanted to enable the Backpack CoreGui, then this code would work:
game.StarterGui:SetCoreGuiEnabled(2, true)
Because 2 is the enum value for Backpack and we are setting it's enabled setting to true, meaning it would be enabled.
These would have to be in LocalScripts located in StarterGui to run because SetCoreGuiEnabled runs locally.
Here is more information on SetCoreGuiEnabled.
If I helped you out, be sure to accept my answer!
4 comments
Awesome thanks man, and thank you all for the answers you given!
You don't have to & SHOULD NOT use the numbers. You can use names: e.g.
"Backpack"or enums:Enum.CoreGuiType.BackpackWhy shouldn't you use the numbers?
You can't read them. Want to tell me what "four" means? There's no reason to make yourself or anyone else go look that up.