Scripting help regarding body movers

So I’ve seen these fantastic dashes in games. I want to create a similar script for my game and tried to replicate the motion with BodyVelocity but had no luck. Would anyone be able to help me understand how I can make the character follow the character’s look direction.

This is an example of what I’m trying to recreate

and this is what I currently get with my BodyVelocity script:

local BodyVelocity = Instance.new("BodyVelocity")
			BodyVelocity.Parent = Character.HumanoidRootPart
			BodyVelocity.MaxForce = Vector3.new(500000,1700,500000)
			BodyVelocity.Velocity = Character.HumanoidRootPart.CFrame.LookVector * 50

			wait(0.5)
			BodyVelocity:Destroy()
1 Like

I simply just run a loop to keep updating the velocity

local BodyVelocity = Instance.new("BodyVelocity")
BodyVelocity.Parent = Character.HumanoidRootPart
BodyVelocity.MaxForce = Vector3.new(500000,1700,500000)
game:GetService("Debris"):AddItem(BodyVelocity , .5)

	while BodyVelocity.Parent ~= nil do
		BodyVelocity.Velocity = Character.HumanoidRootPart.CFrame.lookVector * 50
		game:GetService("RunService").Heartbeat:wait()
	end
	
2 Likes

Aye thanks, it works! I thought updating the velocity constantly would be excessive but it definitely turns out fine. I’m gonna go dissect that code now :walking_man:

1 Like