Player tipping down

okay so, there’s a code I made that makes players dash, but when they actually do dash they slightly bend over and go back up and I think it will be quite irritating for player to not just go in straight line.
I think the reason is because I give too much power for too short duration. and if that’s possible, I would like players to stay in air when I need to (when there’s no ground below then they don’t fall)

    local hmu = plr.Character.HumanoidRootPart
	local LV = Instance.new("LinearVelocity",hmu)
	LV.ForceLimitMode = Enum.ForceLimitMode.PerAxis	
	LV.MaxAxesForce = Vector3.new(100000,0,100000) -- when I put 100000,100000,100000 the player goes down in the ground slightly
	LV.Attachment0 = LV.Parent:FindFirstChildOfClass("Attachment") 
	LV.RelativeTo = Enum.ActuatorRelativeTo.Attachment0
	LV.VelocityConstraintMode = Enum.VelocityConstraintMode.Vector
	LV.VectorVelocity = direction
	
	local tweenClip = game:GetService("TweenService"):Create(LV,TweenInfo.new(duration,Enum.EasingStyle.Quint,Enum.EasingDirection.Out),{VectorVelocity = Vector3.new(0,0,0)})
	tweenClip:Play()
	tweenClip.Completed:Connect(function()
		LV:Destroy()	
	end)

kinda new so sorry if something isn’t there or the topic is in wrong field
the plr, duration and direction are passed, as I want it to be re-usable when I want

Based on video, seems like a collision issue, tip of the rig feet drag against the floor.
I have two ideas on top of my head:

  1. Add a slight force upward
  2. Convert your characters to have a capsule-like hitboxes, where top and bottom are round, removing possible dragging.

Second option would take a second to implement, but I think fixing issue properly is better than putting tape over the issue and calling it a day.

2 Likes

TL;DR: it was the force applying stuff, by making new attachment at humanoidRootPart and lowering it by .278 on y axis it goes forward making no “trip” and if you want player to not fall while doing linear velocity set maxAxesForce to all three 100000

hmm, y’know.
I’ve noticed that doing dash in air also “bends” player
I tried to make legs and floor unCollidable and it still bends the player
perhaps the error somewhere in script…

writing after doing some magic: it was about physics. no, not about hitbox or adding up velocity or my legs scratching the floor, it was the physics force applying stuff.
basically the humanoidRootPart’s default attachment is too high, leading the force being applied the way it goes straight and slightly down, and by lowering it on -.25 it goes perfectly in the center of player, making them push (if not in entirely) forward

1 Like

Glad you found the issue!
#remove30charlimit

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