--wait()
game.StarterGui:SetCore("TopbarEnabled", false)
Leave the wait commented:
SetCore: TopbarEnabled has not been registered by the CoreScripts
Uncomment the wait, no error.
Am I the only one having this problem? (My brother did as well).
2 Likes
Core scripts aren’t guaranteed to run before your own localscripts. This is the correct behavior.
Best strategy:
-- Disable the topbar asap
coroutine.wrap(function()
local timeout = 1
local t = tick()
while not pcall(game.StarterGui.SetCore, game.StarterGui, "TopbarEnabled", false) and tick()-t<timeout do
wait()
end
end)()
Edit: added timeout, new thread
4 Likes
einsteinK
(einsteinK)
February 12, 2016, 9:27am
#3
Core scripts aren’t guaranteed to run before your own localscripts. This is the correct behavior.
Best strategy:
-- Disable the topbar asap
while not pcall(game.StarterGui.SetCore, game.StarterGui, "TopbarEnabled", false) do wait() end
What if they disable the flag, so it’ll never work?
woot3
(Woot)
February 12, 2016, 12:41pm
#4
do local time = tick()
repeat
wait()
until tick() - time >= 1 or pcall(game.StarterGui.SetCore, game.StarterGui, "TopbarEnabled", false)
end
J_J
(J_J)
February 12, 2016, 7:29pm
#5
Hence why the announcement thread said to add a wait and a pcall.
Not replying to a specific person.
system
(system)
Closed
October 25, 2022, 8:27pm
#6
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.