I want to make a dash system where u can dash freely in the air but i cannot stop my character from ragdolling

The system would work completely fine if it weren’t for the issue that no matter whether or not I am airborne when I dash or when I’m standing I seem to ragdoll quite a bit. I believe this is because I’m using linear velocity because I used body velocity and it worked better however I need linear velocity for more free movement during the dash so I’m wondering how I could fix this.

Here’s the code:

local Force = Instance.new("LinearVelocity")
Force.VelocityConstraintMode = Enum.VelocityConstraintMode.Line
Force.MaxForce = math.huge
Force.LineVelocity = 75
	
local Attachment = Instance.new("Attachment")
Attachment.Parent = Character.HumanoidRootPart
Attachment.WorldCFrame = Character.HumanoidRootPart.CFrame
	
Force.Attachment0 = Attachment
	
Humanoid:SetStateEnabled(Enum.HumanoidStateType.Freefall,false)
Humanoid:SetStateEnabled(Enum.HumanoidStateType.Physics,false)
Humanoid.PlatformStand = true

You ragdoll because you set platformstand to true

thats because I want to be able to stay in the air while im dashing

you can have free movement with body velocity if you continously set the velocity to, for example the humanoidrootpart look vector, with something like a while loop

I’d rather do the move direction so they have more control over the dash but that’s just me. Also body velocity makes you float in air if it’s active and they are in air.

like a render stepped function?

no… like a while loop, so for example

local speed = 10 -- in studs
local dashtime = 5 -- secodns
local dashing = false
--and now when we want to dash
dashing = true
task.delay(dashtime, function()
       dashing = false
end)
while dashing do
     bodyVelocity.Velocity = humanoidrootpart.CFrame.LookVector * speed
      task.wait()
end

this should work for a localscript like yours

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