I made a roll ability with a roll animation. I pretty much puts a temporary body velocity that makes the character go forward pretty fast. However, when they hit a wall their character sometimes goes flying or gets knocked down. I have seen some games where the character has a similar dodge ability but can hit a wall and not be effected.
local anim = Instance.new('Animation') anim.AnimationId = 'rbxassetid://01581785274' local playAnim = character.Humanoid:LoadAnimation(anim) playAnim:Play() local bv = Instance.new('BodyVelocity') bv.Parent = character.HumanoidRootPart bv.Velocity = character.HumanoidRootPart.CFrame.lookVector * 75 bv.MaxForce = Vector3.new(math.huge, math.huge, math.huge) wait(.5) bv:Destroy() playAnim:Stop() wait(3.5)
This is what it does pretty much, if anyone knows how i could stop this i would appreciate it, thanks.
its because math.huge is too much it means it will use alot of force to go forward ive tried it with 9999 and it worked fine after.