Right now I’m trying to make a dash that functions similarly to below:
(Credits: Deepwoken by Monad Studios)
I’m not even a little bit familiar with using any of the physics objects in Roblox studio so I decided to test out LinearVelocity, since that is what many other posts on making dashes recommended. Unfortunately I’m running into two pretty glaring issues.
The first one is that the “dash” I made more or less suspends the user in the air, whether or not they are moving in a direction. I would personally like to only change the horizontal (X and Z axes) velocity while leaving the vertical untouched.
The second, arguably more pressing issue is the fact that in addition to suspending the user in the air, the “dash” propels the user MUCH further forwards while airborne (as can be seen in the video), but when the user is on the ground, the force is pretty much unnoticeable.
Any help resolving these two issues, or perhaps providing an alternative method that better fits my specifications would be greatly appreciated, and the script that I am currently using to test this method is detailed below.
Hum = script.Parent:FindFirstChild("Humanoid")
Force = 40
while true do
print(Hum.MoveDirection)
local BodyVel = Instance.new("LinearVelocity")
BodyVel.Parent = Hum.Parent:FindFirstChild("HumanoidRootPart")
BodyVel.Attachment0 = BodyVel.Parent.RootAttachment
BodyVel.MaxForce = 5000
BodyVel.VectorVelocity = Hum.MoveDirection * Force
wait(1)
BodyVel:Destroy()
wait(1)
end
This script is parented to the player’s character and is meant to fire a “dash” every 2 seconds or so. (I know that decreasing the time between the creation of the body velocity and the destruction makes the player hang in the air for a shorter period of time, but ideally I’d like for there to be no time hanging in the air)