diff --git a/builtin/game/statbars.lua b/builtin/game/statbars.lua index 6aa106140..54c05dd6c 100644 --- a/builtin/game/statbars.lua +++ b/builtin/game/statbars.lua @@ -160,6 +160,10 @@ function core.hud_replace_builtin(name, definition) return false end -core.register_on_joinplayer(initialize_builtin_statbars) +-- Append "update_builtin_statbars" as late as possible +-- This ensures that the HUD is hidden when the flags are updated in this callback +core.after(0, function() + core.register_on_joinplayer(initialize_builtin_statbars) +end) core.register_on_leaveplayer(cleanup_builtin_statbars) core.register_playerevent(player_event_handler)