Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I fully remove the topbar?

Asked by 4 years ago

Hello, I'm a novice UI developer, and I am currently working on a project for a new startup group I've made. This project happens to be an application/quiz center, and it looks absolutely awful not being able to fill the dark gray top bar.

I've made a script and put it under StarterPlayerScripts, which is as follows,

wait()
pcall(function()
    local starterGui = game:GetService('StarterGui')
    starterGui:SetCore("TopbarEnabled", false)
end)

I got this code from Stickmasterluke's developer forum thread, yet I seem to have no luck with it.

I'd appreciate any tips to help remove that pesky top bar so that my UI can extend to the top of players' screens!

3 answers

Log in to vote
0
Answered by
NotedAPI 810 Moderation Voter
4 years ago

Make a LocalScript and insert it into StarterGui. Then put that code inside of it. If that doesn't work, make sure you have API services enabled.

0
Thanks for the response, unfortunately that did not work. API services is enabled, as well. InnovativeKawneer 3 — 4y
0
Unsure why, I tested it before I posted this and it worked. Are you sure it's inside of a LocalScript and inside of StarterGui? NotedAPI 810 — 4y
0
Also, the entire thing won't be gone. You will still see the three lines at the top left. NotedAPI 810 — 4y
Ad
Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

Ok, lets try it!

First Step : First of all, we need to know what's the TopBar and how we can acess to them. So we will see it later.

Second Step : We need to know the difference between Script and a LocalScript in this case, we will use a LocalScript. Insert it on ReplicatedStorage or ServerScriptService.

Third Step : Second, we need to know how to make it invicible! Yeah, you can make the Topbar invisible for the player, so you can make your own Topbar.

Fourth Step : Enjoy coding! You always have to enjoy what you are doing! Hear some music or even play some games that relax your first.

Lets get into code!

--> All we need to do is write out 2 lines of code!

local playerGui = game.Players.LocalPlayer:WaitForChild("PlayerGui")
playerGui:SetTopbarTransparency(1)

And that's all! Isn't difficult right?

I hope my answer already sove your question. If it like that, please accept my answer so I can know this works for you!

Keep scripting!

Log in to vote
0
Answered by 4 years ago

Removing the topbar doesn't make GUIs set to take all the space fill that space because the topbar is set to a negative value for the Y axis. In order to find where to set your GUI's position and size to, you need to find the size of the topbar. In order to do this, you need to go into Roblox Studio and go to Settings (Alt + S) -> Studio -> Explorer (the section) -> Show Core GUI in Explorer while Playing, exit the settings, play the game, and access game.CoreGui.RobloxGui.TopBarContainer to get its size. Currently, its size is set to 36, meaning you need to extend your GUI 36 pixels higher. To use this information, you need to first set the GUI's position to be at the top of the screen. With the information above, you need to use 0, 0, 0, -36 for your position and 1, 0, 1, 36 for your size. This will use the space that the topbar used to completely fill the screen. Hope this helps!

Answer this question