If tweening in client is the right choice to reduce server lags, then how can I detect hitboxes?

Just like the title says above, I’m trying to reduce much lag for servers.

I can use some open-sourced modules out there to tween clients such as TweenService V2 or something even more updated but then, the hitbox won’t be accurate and the part you’re tweening is not moving at all in the server so you can’t really use .Touched event as a hitbox identifier for the part you’re tweening in the server.

I can use both Region3 and Heartbeat to server to try to recreate the damage hitbox but I just noticed that maybe this kind of method might just make it worse by making it more laggier.

1 Like

You can use RenderStepped if you want to.

Not in a server I can’t, there will be an error if I do.

Raycasting is a good alternative.

2 Likes

Raycasting can be an alternative for Region3 but I don’t even know if it’s less laggier than Region3.

RenderStepped runs in clients and it is more smoother than Heartbeat In my knowledge.

Yes but I’m detecting .Touched events from the server to prevent exploits.

and I’m using Heartbeat as an alternative for .Touched event to recreate the same method, since I can’t USE RenderStepped in Server, how can I use it?

You can use .Stepped which runs before the physics calculations on the server instead of .RenderStepped

1 Like

Thank you for the knowledge about Stepped, I thought only Heartbeat works for Server.

It seems like it’s impossible to tween hitboxes in client without making them exploitable. I guess the only base parts I should tween in Clients are something that doesn’t involve hitboxes such as Lightings day time or transformations effect that doesn’t really require any hitbox identifier.