[All code in question are on the client]
So, basically what I am trying to achieve is using a CFrame for velocity instead of the classical Vector3 that you would use. I am doing this since I also need a velocity for rotation and CFrame contains both position and orientation
The problem I have stumbled upon is that I don’t know how to “lower the magnitude” of the CFrame. When using Vector3’s I just do Vector3.new(x,y,z) * 0.1 and it is 10 times smaller than originally. This does however not work on CFrames, it just throws an error. Multiplying 2 cframes also just “adds” them together.
I have tried using CFrame.new():Lerp(currentVelocityCFrame, deltaTime) but this gives unwanted results for some reason.
Currently I just multiply the part where velocity is added with 1/240 (since I have 240 fps), but this would not work on laggy computers or just lower framerates overall.
What I am looking for is a way to make CFrame velocities work on all clients, any help would be really appreciated since I have been stuck on this for quite some time now!