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

How to figure out if the topbar is enabled? [closed]

Asked by
blowup999 659 Moderation Voter
7 years ago

The code is in a localscript, and makes TopbarEnabled false ok, but before and after it isn't willing to print whether TopbarEnabled is currently true or false

When I include the print commented at line 2 it breaks the pcall

pcall(function() 
    --print(game.StarterGui:GetCore("TopbarEnabled"))
    game.StarterGui:SetCore("TopbarEnabled", false)
end)

while wait(1) do
    print("Starting new attempt")
    pcall(function()
        print(game.StarterGui:GetCore("TopbarEnabled"))
    end)
end

2
If you try to print "game.StarterGui:GetCore("TopbarEnabled")", it will throw an error saying "GetCore: TopbarEnabled has not been registered by the CoreScripts" Mayk728 855 — 7y
0
Looked at parameters of GetCoreGuiEnabled and GetCoreGuiEnabled requries a parameter of Enum.CoreGuiType, so I think that should work... blowup999 659 — 7y
0
got a true value with game.StarterGui:GetCoreGuiEnabled(Enum.CoreGuiType.All) blowup999 659 — 7y
0
Yeah, so for some reason "TopbarEnabled" isn't there when it should be. Mayk728 855 — 7y
View all comments (3 more)
0
Why not just keep track of the visibility of the Topbar? It's not like anything but the programmer can change it. XAXA 1569 — 7y
0
The plan is to use the script in multiple games and I don't want to have to change the variable for each place blowup999 659 — 7y
0
If you try to print "game.StarterGui:GetCore("TopbarEnabled")", it will make another error saying "GetCore: TopbarEnabled has not yet been registered by the CoreScripts" MadRampageOffical 0 — 6y

Locked by User#19524

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?