For my game, I’m trying to make a third person free-aim system similar to the likes of Guts & Blackpowder and Lexington & Concord. An issue I’m having with it so far is whenever the player moves while aiming, the engine will try to turn the player towards the direction of movement, making it “drag” the player’s aim away from the mouse.
The code I’m using:
RS.RenderStepped:Connect(function()
if (state.Value == "Hipfire" or state.Value == "ADS") and not inFirstPerson() then
humanoidRootPart.CFrame = humanoidRootPart.CFrame:lerp(CFrame.new(humanoidRootPart.Position, Vector3.new(mouse.Hit.X, humanoidRootPart.Position.Y, mouse.Hit.Z)), 0.3)
end
end)