Top bar won't hide?

I’m trying to hide the top bar with the chat and stuff but it won’t seem to work.
I used to code from the reference page but it’s not working.

local StarterGui = game:GetService("StarterGui")
StarterGui:SetCore("TopbarEnabled", false

place this in StarterGui

local StarterGui = script.Parent
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, false) --for example, this should hide chat.
4 Likes