Don't Starve Together

Don't Starve Together

Hide HUD Status
Lio 8 Mar, 2021 @ 6:12pm
Fix to avoid crash (in main menu)
This check is to see when the player exists:
_G.ThePlayer ~= nil

Add that line in the function (like this):
local function HUD() --hide HUD if HUD_Status == true and _G.ThePlayer ~= nil then if not _G.ThePlayer.HUD:IsChatInputScreenOpen() and not _G.ThePlayer.HUD:IsConsoleScreenOpen() and not _G.ThePlayer.HUD.writeablescreen then _G.ThePlayer.HUD:Hide() HUD_Status = false end else --show HUD if _G.ThePlayer ~= nil then _G.ThePlayer.HUD:Show() HUD_Status = true end end end

Now only works when the player exists on a server! :DSTportal:
(and does not work when the game is in main menu)
Last edited by Lio; 27 Mar, 2021 @ 8:12pm