The goal I need to achieve is to make the player limp (this regulates the intensity of limping) when walking. I imagine it this way: the player will slow down when walking (if necessary, for greater aesthetics, you can also slow down the camera), and then there will be a jerk that will return the previous values. However, this is quite difficult, since the player’s speed can change during the sprint, so how can this be implemented?
RNS.RenderStepped:Connect(function()
local velocity = math.round(Vector3.new(HRP.AssemblyLinearVelocity.X, 0, HRP.AssemblyLinearVelocity.Z).Magnitude)
if velocity > 0 then
camera.CFrame *= CFrame.new(0, GetCurve(verFrequency, verIntensity) * velocity / defWalkSpeed, 0) * CFrame.Angles(0, 0, math.rad(GetCurve(rotFrequency, rotIntensity) * velocity / defWalkSpeed))
end
end)