Dash (linear velocity) causes custom character to enter the "falling down" state when its used against a wall or inclined surface

	local root = char:FindFirstChild("HumanoidRootPart")
	local force = 100
	local clone = storage.CartCurt.DashTrail:Clone()
	clone.Attachment0 = root:FindFirstChild("Attachment0")
	clone.Attachment1 = root.Attachment1
	clone.Parent = root
	debris:AddItem(clone, .5)
	local velocitysuresi = 0.15
	local Velocity = Instance.new("LinearVelocity")
	Velocity.MaxForce = 50000
	Velocity.VelocityConstraintMode = Enum.VelocityConstraintMode.Vector
	Velocity.Attachment0 = root.RootAttachment
	Velocity.RelativeTo = Enum.ActuatorRelativeTo.Attachment0
	Velocity.VectorVelocity = Vector3.new(0,0, -force)   -- root.CFrame.LookVector * force -- Vector3.new(0,0, -force)
	Velocity.Parent = root

Local script by the way.

I tried it without animations with custom character, it was still same. I tried the same script with a regular R6 rig and it was working properly. So i think character is the problem but i dont know what causes this.


1 Like

Try basing the max force based off the root’s AssemblyMass and create a dash attachment for the dash instead of using RootAttachment

local DASH_SPEED = 60
local DASH_FORCE_FACTOR = 1500
local DASH_TIME = 0.2

local humanoid = if char then char:FindFirstChildOfClass("Humanoid") else nil
local root = if humanoid then humanoid.RootPart else nil
if not root then
	return
end
local attachmentMaybe = root:FindFirstChild("DashAttachment")
if attachmentMaybe and not attachmentMaybe:IsA("Attachment") then
	attachmentMaybe:Destroy()
	attachmentMaybe = nil
end
local attachment = if attachmentMaybe then attachmentMaybe else Instance.new("Attachment")
attachment.Name = "DashAttachment"
attachment.Parent = root
-- local velocitysuresi = 0.15 (dont know what this was for)
local velocity = Instance.new("LinearVelocity")
velocity.Name = "DashVelocity"
velocity.Attachment0 = attachment :: Attachment
velocity.RelativeTo = Enum.ActuatorRelativeTo.Attachment0
-- Dash force is multiplied by the character's total mass to ensure consistency
velocity.MaxForce = DASH_FORCE_FACTOR * root.AssemblyMass
velocity.VectorVelocity = Vector3.new(0, 0, -DASH_SPEED)
velocity.Parent = root
task.delay(DASH_TIME, velocity.Destroy, velocity)

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