This is my code, I register it and when i use “GetRegisteredCommands” it returns {}
local Main = {}
local CommandsModule = script
local Commands = {}
Main.cmds = Commands
function Main:Register(name: string)
self.UID = UID
Commands[UID] = self
return self
end
(Long part of the code was hidden after the responde bc of privacy things)
Either UID is coming back nil, or you’re registering and reading commands from different environments. ModuleScripts are not shared between the client, server, and CLI (Command Line Interface)