Spawning ents from a menu.

Hi guys,

I Tried to figure out a way to spawn entities from a menu, but it just doesn’t want to work.
First time I tried it by concommands, only to find out that all ent_ commands are blocked, then I tried it with ents.Create but that gives this:

[@gamemodes\project\gamemode\init.lua:66] Tried to use a NULL entity!

Even looked into several other gamemodes to find out how others did it, but couldn’t find it nonetheless.

So, what would be the best way to achieve this?

**[Ents.Create

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Ents.Create)** is what you want to use, what entity are you trying to spawn?

Seems like you’re trying to spawn an entity that is non-existent.

I like to point out the obvious.

Captain obvious.

@OP

You cannot create entities on the client, you’ll need to send concommand to the server and tell it to create entities.

If its init.lua I doubt he is running it on the client :stuck_out_tongue:

Thanks guys, it all works fine now!