Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Made a rolling script and im trying to make it so u dont get flung, but how?

Asked by 3 years ago

My game has rolling (with BodyVelocity) and Im trying to make an anti fling script but I have no clue how, can somebody explain me how I can make 1?

When you roll against a wall it will fling you

If you need the script to look at it heres a part of it

local lookVector = humanoidRootPart.CFrame.LookVector           
local bodyVelocity = Instance.new("BodyVelocity")

bodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
bodyVelocity.Velocity = lookVector * 60
bodyVelocity.Parent = humanoidRootPart

Answer this question