Console commands added with concommand.Add don't get recognised the first time?

Hi guys,

I am currently working on a gamemode, but my console commands I added with concommand.Add in the init.lua don’t work, they show up as autocomplete but once I hit enter it says unknown command.

However, when I reload my init.lua by adding a space, deleting it and saving the file it works perfectly fine. Any fix for that?

Thanks in advance!

Listen Server? if yes, did u add the concommand clientside?

You’re probably calling concommand.Add before defining the actual function you pass to it.

Oh that means I have to put concommand.Add in the end? That’s interesting!

Edit: Works like a charm now! Thank you very much!