Small problem with top-bar

Hello developers,

I have a small problem with the top bar. I want to make the core top bar transparency to 0 however it doesn’t work. I’ve scripted this in StarterGui:

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

playerGui:SetTopbarTransparency(0)

Any help on this is much appreciated!

1 Like

I assume this is a LocalScript? You are trying to make the top bar fully visible?

Yes, this is a local script.

I’m trying to make the top bar fully opaque.

I believe the method SetTopbarTransparency() is part of the starter gui and not player gui

It is not, it looks to me like he is doing this right. Is the script running?

Maybe you are using a framework that automatically sets it to 1 instead of 0. Another thing to mention is that 0 would represent fully visible

You need to place the local script in s
StarterPlayerScripts not StarterGui

3 Likes

Maybe he is running the local script in starter gui and not starter player scripts

I’ve already tried that it doesn’t seem to work and there’s no error in the output too

EDIT: I’ve got help with the script from developer hub so perhaps there’s something wrong with that

do you want it to be invisible? If so, set the transparency to 1 and not 0

1 Like

I want the top bar to be fully opaque

This wouldn’t matter (though it is better practice to do so)

1 Like
game:GetService('Players').LocalPlayer:WaitForChild('PlayerGui'):SetTopbarTransparency(0)

try this, i found this on the page about TopBar

1 Like

I’ve tried that before making the post. The top bar still remains transparent.

EDIT: Unless of course I have missed out something

1 Like

i have found a similar topic with a solution and explanation.

link here

2 Likes

Ever since the Topbar update, SetTopbarTransparency hasn’t been working and will eventually be deprecated. The only way is to create a custom top bar, which the developer hub documentation of this function has code for in the “Code Samples” section

3 Likes

Yeah, seems to be the only way around this, thanks very much for the advice!

Yeah, as Rare_tendo said, seems like the Topbar transparency hasn’t worked so a custom topbar seems like the only way to solve this. Thanks very much for helping out!

1 Like