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!
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.
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!
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!