I have a dashing script and this line of code
HRP.CFrame = CFrame.New (RollDirectiondTRollMult) * HRP.CFrame
leads to this number 0, -3.40282347e+38, 0 * 44. I don’t know how to fix that
wait(1)
local Movement = {
["Sprint"] = function(Player, Params)
end,
["Dash"] = function(Player, Params, UserInput)
local Character = Player.Character or Player.CharacterAdded:Wait()
local HRP = Character:WaitForChild("HumanoidRootPart")
local humanoid = Character:WaitForChild("Humanoid")
local Roll = humanoid:LoadAnimation(script:WaitForChild("Roll"))
Roll.Priority = Enum.AnimationPriority.Action
local Debounce = false
local RollStartTime = 0
local RollDirection = Vector3.new()
local RollMult = 15/Roll.Length
Debounce = true
if Debounce then
RollStartTime = tick()
local dirVec = HRP.CFrame.LookVector
RollDirection = (dirVec*Vector3.new(1,0,1)).unit
local LastBeat = tick()
game:GetService("RunService").Heartbeat:Connect(function()
local dT = tick()-LastBeat
LastBeat = tick()
if tick()-RollStartTime < .75 then
HRP.CFrame = CFrame.new(RollDirection*dT*RollMult) * HRP.CFrame
print(HRP.CFrame)
end
end)
end
Debounce = false
end,
}
return Movement