local coregui = game:GetService("CoreGui")
local hotbar = coregui.RobloxGui.Backpack.Hotbar
I’m trying to make a hotbar saving system for my game and since only the client can view their own hotbar in the coregui I have a local script (since I dont think I can get the hobar of a player from the server) to get the toolname on each slot in the hotbar section of the coregui. I then fire a remote event to save the hotbar
However when I call the hotbar variable I get this error.
Why is this and are there any solutions?
The problem is that you are trying to access Core Gui which is not availabe to scripts with a security identity of 2 (basically just LocalScripts, ServerScripts, and ModuleScripts). Core Gui can only be accessed by the Roblox Studio Command Line and Plugins.
Do those games have custom inventory systems? Because even if you tracked the items as they are going in the player could still just move them around and you would not be able to detect that.
CoreGui can only be accessed by CoreScripts which are handled & executed by Roblox internally, in short you are unable to access & modify the features of any CoreGui, you can however remove CoreGui and implement other Gui in its place.
is there any way I can recreate the backpack without needing to recreate its functionality?
I would love to recreate the backpack but I don’t want to lose its functionality.