Get my swep to shoot combine energy balls, through primary?

EDIT: Can someone tell me how to use “func_combine_ball_spawner” in a function to spawn a combine ball? If it’s the correct way to do this.
this question is at the top so you can read it first hand.

So what I’m trying to do is make like a Megaman arm gun that fires combine balls. I’ve been looking all over the internet for a tutorial on how to make this work but couldn’t seem to find one (or on the ones I did find, I couldn’t find a working link), so I came here looking for help.
I was wondering if anyone could tell me exactly how to do this; because I’m sorta like a noob to lua scripting.

Asuming you’ve already made the primary Weapon code.

I havn’t dealt with Gmod lua or SWEPS for over 3 years. But try this.

local ent = ents.Create( “prop_combine_ball” )

This should, upon firing your weapon, create the prop “Combine ball”. Asuming you’ve already coded the Weapon.

If this doesn’t work i apoligize and will go deeper to find a solution :slight_smile:

in primary attack function, try

local ball = ents.Create( "prop_combine_ball" )

you can take it from here

You have forgot to set the velocity