So, in this movement script im making, there is a dash function. Im applying the velocity to the character, but all it seems to do is just jump slightly. How would I fix this issue?
local event = script.Parent.ZipEvent
event.OnServerEvent:Connect(function(plr)
local char = plr.Character
local hum = char:WaitForChild("Humanoid")
local HRT = char:WaitForChild("HumanoidRootPart")
local hitbox = HRT:WaitForChild("Hitbox")
local zipStrength = char:WaitForChild("VariablesFolder").ZipStrength.Value*10000
local velocity = HRT.Velocity
local baseVelocity = velocity
local lookVector = HRT.CFrame.LookVector
print(HRT.Velocity)
HRT.Velocity = baseVelocity + lookVector * zipStrength
char:WaitForChild("Torso").DashVFX.Enabled = true
task.wait(.1)
char:WaitForChild("Torso").DashVFX.Enabled = false
end)```
(video is example of what the script does)