. . . Posted January 13, 2019 Share Posted January 13, 2019 Hello, I was wondering if there's a way to hide the crafting hud completely, thanks for reading ! Link to comment Share on other sites More sharing options...
eZeth Posted January 14, 2019 Share Posted January 14, 2019 (edited) I don't know why it's hard to access an HUD root's children but here it is. local _G = GLOBAL local GetPlayer = function() return _G.ThePlayer end local Controls = GetPlayer().HUD.controls Controls.crafttabs:Hide() EDIT: Changed code as been said by @bizziboi Edited January 14, 2019 by eZeth Link to comment Share on other sites More sharing options...
Developer bizziboi Posted January 14, 2019 Developer Share Posted January 14, 2019 I think you don't have to iterate the children? Can't you just say GetPlayer().HUD.controls? Link to comment Share on other sites More sharing options...
eZeth Posted January 14, 2019 Share Posted January 14, 2019 3 minutes ago, bizziboi said: I think you don't have to iterate the children? Can't you just say GetPlayer().HUD.controls? Oh? I thought since its under HUD.root it should be accessed from root and not from HUD. And it is lowercased? Anyways. I'll just edit the code to reflect what you said. Thanks! Link to comment Share on other sites More sharing options...
Developer bizziboi Posted January 14, 2019 Developer Share Posted January 14, 2019 Playerhud.lua has: self.controls = self.root:AddChild(Controls(self.owner)) So it is assigned to a variable on the HUD itself. Link to comment Share on other sites More sharing options...
eZeth Posted January 14, 2019 Share Posted January 14, 2019 I see. That's nice! Thanks for the info Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now