Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to turn off this part of the core GUI?

Okay, so since I have started scripting, this one thing irritates me. It is this bar right here problem. I don't know how to turn it off, any ideas of how to turn it off?

3 comments

0

local StarterGui = game:GetService("StarterGui") StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false) will disable it, and local StarterGui = game:GetService("StarterGui") StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, true) will enable it

3 answers

What you're aiming to do is "remove" the topbar, you can do this by making the topbar opaque in the following way:

PlayerGui:SetTopbarTransparency()

As explained on the wiki, you can use the PlayerGui:SetTopbarTransparency(float transparency) method to - self explanatory - set the topbar's transparency. The wiki explains the same:

SetTopbarTransparency sets the transparency of the Topbar CoreGui. A value of 0 is completely opaque, and a value of 1 is completely transparent

The script

-- In a local script placed in StarterPlayerScripts
local client = game:GetService("Players").LocalPlayer
local playerGui = client.PlayerGui

local function toggleTransparency()
	local current = playerGui:GetTopbarTransparency()
	playerUI:SetTopbarTransparency(current >= 0.5 and 0.5 or 0)
end

-- At whatever point you need to toggle the transparency
toggleTransparency()

Please comment if you have any questions or I have made a mistake

Those parts of the game are part of a StarterGui:SetCore. You can read about it here (https://developer.roblox.com/api-reference/function/StarterGui/SetCore). For your problem. You would need to reference the starter gui and use :SetCore to access core scripts. In your case you would want to remove the top bar. In the first arguement, write a string with what type of CS you want tp edit ("TopbarEnabled"), then use the other arguements to edit which core script you are editing.

game.StarterGui:SetCore("TopbarEnabled",false) --boolean value

``

1 comment

0

Also i am a nub of code blocks

I got it:

go onto your ScreenGUI and enable "IgnoreGuiInset".

This discussion is preserved as it was. New answers, comments, and votes are closed.