What is the best way to make a player dash left or right? [closed]
I'm trying to make a script to dash left or right. So far it works but not as good as I want.
1 | Dash = function (velocity, anim) |
2 | local bodyV = Instance.new( "BodyVelocity" , char.HumanoidRootPart) |
3 | bodyV.MaxForce = Vector 3. new( math.huge , math.huge , math.huge ) |
5 | bodyV.Velocity = velocity * 60 |
6 | game.Debris:AddItem(bodyV, 0.2 ) |
This is the code I'm using. The problem is that if I dash when I'm on the ground I move very little but if I jump and dash I move further. How can I make it so that it always dashes the same distance even if I'm jumping and in the same amount of time?
Closed as Primarily Opinion-Based by User#24403
This question has been closed because it is a discussion about a topic focused on diverse opinions, which isn't a good fit for our Q&A format.
Why was this question closed?