How to make viewmodel movement smooth

im making a viewmodel but its server sides cuz everyone needs to see so its a little laggy how to make it smooth, only for the player its for not for other view

Why would you ever handle a viewmodel on the server? That is a horrible idea for anything that needs a high level of responsiveness, much less a viewmodel. If you need everyone to see it, you should have the client pass the necessary data to the server and then have that data forwarded to the other players in the game so they can replicate it on their client. Never do anything like this on the server.

so when i do it on client can u give steps on how to show to others

You want to have the client with the viewmodel send any necessary information required to render the viewmodel to the server. In your case it would probably just be the camera CFrame. Once the server receives it, have it send that information back down to all players in the game except the one who sent it (technically you could have it send it back to all players and just have the original player ignore it, but that wastes bandwidth).

Then when the other players receive the data, for example the camera CFrame of the player whose viewmodel they are rendering, they can perform the necessary calculations on their own machine to render it with a high level of responsiveness as well.

Also, use UnreliableRemoteEvents to send this data around. You’ll probably have to send the data multiple times a second and it’d be wasteful to use normal RemoteEvents for that. With something like this you don’t care what order the packets come in or whether some of them are dropped every now and then.

1 Like

ok ill try this and see if it works

oh ye this works much better thx

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.