local DashModule = {}
local DashStop = 0.75
function ApplyDash(Character, DashDirection)
local Attachment = Instance.new("Attachment", Character.HumanoidRootPart)
Attachment.WorldPosition = Character.HumanoidRootPart.AssemblyCenterOfMass
if DashDirection == "ForwardDash" then
local LinearVel = Instance.new("LinearVelocity", Character.HumanoidRootPart)
LinearVel.MaxForce = 100000
LinearVel.VelocityConstraintMode = Enum.VelocityConstraintMode.Vector
LinearVel.ForceLimitsEnabled = true
LinearVel.ForceLimitMode = Enum.ForceLimitMode.PerAxis
LinearVel.MaxAxesForce = Vector3.new(100000, 0, 100000)
LinearVel.Attachment0 = Attachment
LinearVel.RelativeTo = Enum.ActuatorRelativeTo.Attachment0
LinearVel.VectorVelocity = Character.HumanoidRootPart.CFrame.LookVector * 25
end
task.delay(DashStop, function()
Attachment:Destroy()
end)
end
function DashModule.Dash(Character, DashDirection)
if not Character then return end
if DashDirection == "ForwardDash" then
print("forward dash")
ApplyDash(Character, DashDirection)
end
end
return DashModule
can someone tell me why my dash isnt going forward??
** You are now Level 1! **