#anyone know why my velocity script isint working?
1 messages · Page 1 of 1 (latest)
if gameprocessed then return end
if input.KeyCode == keybindDash then
local now = time()
if now - lastTap < 0.2 then
if dash then
dash:Destroy()
end
local axisise = Instance.new("BodyVelocity")
local varVelocity = char.HumanoidRootPart.Velocity
local sumXZ = varVelocity.X + varVelocity.Z
axisise.MaxForce = Vector3.new(0,1,0) * 30000
varVelocity = Vector3.new(0, sumXZ, 0)
axisise.Parent = char.HumanoidRootPart
for count = 1, 4 do
wait(0.1)
axisise.Parent = char.HumanoidRootPart
varVelocity = Vector3.new(varVelocity.X, varVelocity.Y * 0.85, varVelocity.Z)
print("axisising")
end
axisise:Destroy()
end
lastTap = now
if not candash then return end
candash = false
local dashsound = dashsoundwork:Clone()
dashsound.Parent = char.HumanoidRootPart
dashsound:Play()
local dash = Instance.new("BodyVelocity")
local varVelocity = char.HumanoidRootPart.Velocity
varVelocity = Vector3.new(varVelocity.X, 0.1, varVelocity.Z)
dash.MaxForce = Vector3.new(1,1,1) * 30000
dash.Velocity = varVelocity * 10
dash.Parent = char.HumanoidRootPart
for count = 1, 3 do
wait(0.1)
dash.Velocity *= 0.4
print("dashing")
end
dash:Destroy()
dashsound:Destroy()
wait(dashTimer)
candash = true
end
```
Its being printed that the player is axisising but there is no velocity change. Its a regular dash.
yes ik its noodle code🍝 , im just trying to get it working first