Having problems with hiding coreguis in menu

I’m trying to hide all coreguis until the play button is pressed on the menu.
I have already made localscripts to make the menu work, one in startergui and the other inside the startergui button.
I added StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false) to the startergui script and StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, true) to the one in the button. However, the coregui doesn’t disappear.

If it is in a regular script, you wanna change it to a LocalScript.

It is a localscript.
Go away 30 characters