When I use my rolling ability it causes my character to be pushed backwards during left and right rolls using camera lock-on. I’m pretty sure it’s because of the lock-on camera making my character’s position weird but idk
I’m using a different script for free cam than when you lock on. The free cam uses LookVector for WASD and body velocity while the lock-on camera rolling is using RightVector for the A and D keys.
Are you using align orientation for the lock on system? I had the exact same issue with my lock on dashing system and align orientation with a high responsiveness fixed it.
Is your tool massless? I know roblox physics tend to slightly push you sideways when midair if you have a heavy tool.
Other than that it could be the animation itself, maybe try making it so the character doesn’t touch the ground but hover 0.1 studs above ground, this can be done using the “HipHeight” property in the humanoid.
Outside of the renderstepped create an align orientation and use this function to calculate the correct angle
local alignOrientation = Instance.new('AlignOrientation', rootPart)
local orientationAttachment = rootPart:WaitForChild('RootAttachment')
alignOrientation.Attachment0 = orientationAttachment
alignOrientation.Mode=Enum.OrientationAlignmentMode.OneAttachment
alignOrientation.Enabled = false
alignOrientation.Responsiveness = 10000
alignOrientation.MaxTorque = 1000000
local function findAngle(positionA, positionB)
local CF=CFrame.new(positionA, positionB)
local targetX, targetY, targetZ=CF:ToEulerAnglesXYZ()
local finalizedAngle=CFrame.Angles(targetX, targetY, targetZ)
return finalizedAngle
end
Inside of the renderstepped replace the code where you set the cframe of the humanoidrootpart with this:
(Replace target with the enemy’s character and rootPart with your own characters humrp)