Shotgun that laucnhes player in air

So i wondered how could i possibly make a shotgun that will launch player in the air when shooted and i don’t know how could i do it.
Any help would be appreciated.

1 Like

You can use a BodyVelocity instance.

local velocity = Instance.new("BodyVelocity", player.Character.HumanoidRootPart)
velocity.MaxForce = Vector3.new(math.huge, math.huge,  math.huge)
velocity.Velocity = Vector3.new(--[[your velocity]])
task.wait(0.1)
velocity:Destroy()
1 Like

I currently don’t have time, but i will sure try it out!

1 Like

You can use ApplyImpulse() to apply a force to the player that gets shot.
To do this, we need to get the direction of the shot and multiply it by the mass of the player, and the desired launching power of the shotgun.

local ShotgunPower = 100  --how far should it launch the player
local hrp = playerThatGotShot.HumanoidRootPart   --you can change this to any part of the player, eg player.Head
local direction = (hrp.Position - shotgun.Position).Unit  --here, we get the direction of the shot
local force = direction * ShotgunPower * hrp.AssemblyMass  --multiply it by ShotgunPower and the mass of the player to get the right amount of force
hrp:ApplyImpulse(force)