You can write your topic however you want, but you need to answer these questions:
I want to have my player moving smoothly as he does in this recording:
https://gyazo.com/99928d5d318f18e23dafa220d64bc2e9
however, you can see in the game here and this recording the character has a stutter, most likely from the force applied to the humanoidrootpart:
https://gyazo.com/ae890f85a90eca71d8f587035e01fcdb
https://www.roblox.com/games/5694188897/FPS-Test?refPageId=2e0fd6fd-0d64-44b6-ad74-70e0971843ba
I have tried adding a body gyro which you can see in the script stops rotation on the x and z-axis. I have also tried using another part welded to the humanoidrootpart that instead moved(obviously this didn’t work)
note:
there is no 3rd person in my game because its a first-person game but when you move forward you’ll notice the jitter when you stop.
my movement code if that will help you:
while wait() do
local isonGround = raycast({Character},(Root.CFrame).p,Vector3.new(0,-4.5,0))
local RX, RY, RZ = Character.HumanoidRootPart.CFrame:toOrientation() --These values are in radians.
BG.CFrame = CFrame.new(BG.CFrame.p) * CFrame.fromOrientation(0, RY ,0) --So on for the rest of the rotations.
if isonGround ~= nil then
MovementVect = Vector3.new(0,-Downward,0)
local spaceHeld = UserInputService:IsKeyDown(Enum.KeyCode.Space)
if spaceHeld then
MovementVect = MovementVect + Vector3.new(0,JumpHeight,0)
end
if w then
MovementVect = MovementVect + Root.CFrame.lookVector * Character.Humanoid.WalkSpeed * Pow
elseif s then
MovementVect = MovementVect - Root.CFrame.lookVector * Character.Humanoid.WalkSpeed * Pow
else
MovementVect = MovementVect
end
if d then
MovementVect = MovementVect + Root.CFrame.RightVector * Character.Humanoid.WalkSpeed * Pow
elseif a then
MovementVect = MovementVect - Root.CFrame.RightVector * Character.Humanoid.WalkSpeed * Pow
else
MovementVect = MovementVect
end
else
MovementVect = MovementVect + Vector3.new(0,-Downward,0) -- keeps you moving forwards
end
BV.Velocity = Vector3.new(Lerp2(BV.Velocity.X,MovementVect.X, .2),MovementVect.Y,Lerp2(BV.Velocity.Z,MovementVect.Z, .2))
end