Making a gun that shoots an entity which latches onto a player?
1 replies, posted
How would I go about to make a weapon that could shoot an entity and that entity would stick to a player if it hit him. I literally have no idea where to begin so any links to anything useful would be greatly appreciated.
No experience with sticking things to players myself, but I would imagine you could work this out if you find another weapon that shoots out entities and learn how it works.
Someone correct me if I'm wrong but my best guess would be with the sticking to use something like [url=https://wiki.garrysmod.com/page/ENTITY/PhysicsCollide]PhysicsCollide[/url] to check if the entity is colliding with a player, and if so using [url=https://wiki.garrysmod.com/page/Entity/SetParent]SetParent[/url] to parent it to the player (Not sure if I'm just imagining this but I swear there is some dodgy stuff with parenting to the player directly rather than specific bones)
Sorry, you need to Log In to post a reply to this thread.