Help with a Entity throwing gun

Alright, so I just decided to get into SWEPs recently and I read the whole tutorial on how to make the chair throwing gun etc. etc.

I program in C++, Java, and Lua so I’m not a complete idiot (maybe with Java because I hate it)

I’m trying to have the physics prop that is shot from the gun register an ENT:Touch() function. I am trying to have it hit an object and check to see if it’s a player, a physics object, etc. etc.

The gun has a SWEP:PropLaunch( ModelPath ) function. In my case I have it create the entity of type “prop_physics” and launch it at a high velocity across the map. The entity was assigned to the variable of ‘Model.’ If I am trying to run a ENT:Touch() function on it, where would I use ENT:Touch()? Can I create a table for the created model?

In the case that I have to create my own entity and spawn that instead, which I’ve tried, I keep getting the error “Attempted to create unknown entity of type Model_Dicknugget.” and the ENT.Type = “” doesn’t really work for that either.

Help would be very appreciated! <3 in advance :smiley:

tl;dr = Fuck you. You’re lazy piece of shit. Read it anyways ( please :3 )

You have to restart the server after adding a new entity and sometimes even GMod.

Thank you very much. I’ll give it a go.

Alright. It worked. Thank you Polish sir.

You never need to restart GMod for Lua stuff.