Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Roll ability sends character flipping when he hits a wall?

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.

2 comments

0

I think you should put before playAnim:Play() you should put playAnim.Priority = 2

0

why is that?

1 answer

✓ Accepted answer

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.

1 comment

0

thank you very much.

This discussion is preserved as it was. New answers, comments, and votes are closed.