Tween on the server or client?

Recently I heard that tweening on the client is more efficient than on the server? Is this true and can I have an explanation?

If I was to tween on client, do I have to use remote events in order to let clients to see the tween when it’s necessary?

4 Likes

Any special effects (animations, particles, etc) should always be handled on the client. This is to reduce the load on the server, and create the most seamless effects possible for the players on the client. If for example tweens were to be handled entirely on the server, if you have a bad connection the tweens would appear jittery, whereas on the client they would look flawless.

This is correct. If tweens are handled on the client only the local player would see the tween unless you use remote events to display the tween for everyone.

2 Likes

I have a bad feeling that if I was to tween like most parts of the game on client (which I need to because my game would take a lot of animations such as tweens, etc), performance may be bad for client. Or am I wrong?

1 Like

Although there would still be some performance issues with tweening for example: an entire map, it would be significantly better to do this on the client. As I’ve said previously, handling animations on the client far reduces the load on the server. If one was to tween an entire map on a server, it would make the game virtually unplayable because of the sheer amount of lag coming into every client from the server trying to display the entire map getting tweened. Performance issues will always come with large scale tweens and animations, so it’s up to you to find how you want to optimize it, but handling special effects on the client far outweighs handling it on the server.

Tweening everything on a map can certainly cause performance issues for a client, but that applies to the server as well. You should always tween on the client, since tweens handled on the client reduce strain on the server, not to mention that they always look better.