I’m currently trying to make it so when you activate an ability, you dash for a set duration. However, through my friends I’ve learned that if you rapidly spin your camera in a circle and hold jump you can go extremely far.
This is what’s intended.
This is what happens…??
I’m not really sure what to do.
local originalTimer = .8
local dashLengthTimer = originalTimer
local bodyVelocity = Instance.new("LinearVelocity")
bodyVelocity.Name = "WarriorAB1Dash"
bodyVelocity.Parent = character
bodyVelocity.Attachment0 = humanoidRootPart.RootAttachment
bodyVelocity.MaxForce = math.huge
bodyVelocity.VelocityConstraintMode = "Line"
dashLength = RunService.Heartbeat:Connect(function(dt)
dashLengthTimer -= dt
bodyVelocity.LineDirection = humanoidRootPart.CFrame.LookVector * Vector3.new(1, 0, 1)
bodyVelocity.LineVelocity = 50
if dashLengthTimer <= originalTimer - .3 and ab1Combo == 1 then -- Original - Delay before you can nuse ALT AB1
ab1Combo = 2
end
if ab1Combo == 2 then
player.PlayerGui.SkillGui.Frame.Skills.AB1.TextLabel.Text = "!!!"
end
if dashLengthTimer <= 0 then -- ends naturally
animations[4]:Stop()
bodyVelocity:Destroy()
ab1Combo = 1
actionable -= 1
putOnCooldown("AB1", 4)
dashLength:Disconnect()
end
Thank you for any help