Flinging a player

I am trying to make a script that flings the player towards the “LeserelModel” and I’m not too sure how to do it without BodyVelocity, which I don’t want to use considering it’s deprecated.

So, if someone could help me out, it would be much appreciated.

function AttackModule.LeserelSuction(LeserelModel, Target)
	
	local LeserelAnimFolder = LeserelModel:FindFirstChild("Animations")
	local FlingAnimation = LeserelAnimFolder:FindFirstChild("Fling")
	
	local Animator:Animator = LeserelModel:FindFirstChild("Humanoid"):FindFirstChild("Animator")
	local FlingTrack = Animator:LoadAnimation(FlingAnimation)
	
	FlingTrack:Play()
	
	FlingTrack:GetMarkerReachedSignal("Fling"):Wait()
	
end

BodyVelocity is fine, it’s just outdated, you can also use LinearVelocity or Velocity for flinging. Make sure the velocity only lasts around 0.2 seconds and make it extremely powerful, so it has the kind of “fling” feel.

3 Likes

I’ve never really used LinearVelocity, so could you give me an example of how to use it?

1 Like

LinearVelocity is like BodyVelocity, just a bit more complicated and not deprecated. It uses Attachments, and has alot of properties.

1 Like

Use :ApplyImpulse() as it already has almost 90% of all Projectile motion done in itself.

1 Like

90%? is there another one with 100%?

:ApplyImpulse() itself is 100% if you use the right Physics formulas…

1 Like

I’ve got it working now. I just ended up using BodyVelocity. Thanks for the help though

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.