How to reduce lag?

Does using a remote event and letting the clients load in assets reduce lag such as tweens or special effects? Also, is using a tween less laggy than using a loop?

Lastly, does loading projectiles on the client reduce lag? Currently they are serversided to prevent against exploiters, but I was not sure if it was such a great improvement in lag if I were just to let the client handle it.

3 Likes

So, there’s quite a bit to unpack here, so let’s take this 1 question at a time:

  1. Does using a remote event and letting clients load in assets such as tweens or special effects?
    -Special effects should be loaded by the client anyways, Graphical Effects are usually used for immediate feedback, so you always want the client to see that immediately

  2. Is using a tween (TweenService) less laggy than using a loop?
    -Yes, TweenService is a built in API, Generally speaking the Roblox API are built to tap into the C++ Backing so they are inherently faster than making the same process yourself using RbxLua.

  3. Lastly does loading projectiles on the client reduce lag? Currently they are serversided to prevent against exploiters, but I was not sure if it was such a great improvement in lag if I were just to let the client handle it.
    -If it’s only a graphical effect, yes, however you should always aim for the logic of anything that affects gameplay (Winning or Losing) should be done by the Server to prevent exploiters from having free reign over it.

There’s an old Roblox Wiki article called “Fighting Lag” where they use several different cannon approaches to show how to fight lag. I suggest taking a read of it at this page.

3 Likes