#why is movement so choppy?
1 messages · Page 1 of 1 (latest)
try sending the script
screenshots of relevant scripts:
you ought to use :setnetworkowner
wait who should get networkownership of what?
** You are now Level 1! **
you need to add position interpolation 
ye
what is position interpolation and how do I add it
you know how the client runs faster than the server (potato pc´s excluded), well thats why its choppy, the server sends updates to clients at 20Hz (<citation needed) and clients ussually run at 60Hz, so you need to interpolate the 40Hz of difference 
how do I do the math on what the lerp alpha should be?
also uhhhh how do you get lerp to work with linearvelocity?
ok I think I did everything but its still choppy idk why
also choppy on server side :(
userinputservice.inputbegan( while true do ... end) you should never have an infinite loop in inputbegan for starters.
and best i can tell, it looks choppy because you're setting cframe every frame, there is no physics so other clients cannot interpolate and don't know how the character is moving.
also there is no localplayer on the server and you don't need to setnetworkowner since the player usually already has network ownership of their character
would it be better to put the userinputservice function in the renderstepped function or do something completley different?
** You are now Level 2! **
"is it better" and "should i" questions are questions i refuse to answer. that's your job to figure out
i'm only going to get you to working.
and to that end i suggest you add prints to a bunch of places because i suspect code is running multiple times because of that loop, so your interpolation is even worse.
nah its just that removing the while loop changes the movement in a way that I really dont like so I have to troubleshoot that first lol
changed up most of the movement script but its still having stutter issues :(
i'm actually gonna blow my brains schmoove off at this point
like what the hell
ok so movement is still choppy, and I'm not sure what to do. This is the script i'm using. What am I missing?