How to make optimized server-side tweens?

Hi, I recently released Optimized Interactive Grass Plugin which gives grass spring physics, and makes it so when you touch grass it’ll tween it and simulate spring physics on the client. I’m wondering how I could make it so all clients see the tweens in an optimized way? Doing the tweens on the server would cause too many calculations and result in lag, so would I create a remote event and make it fireallclients when someone touches grass or something

2 Likes

yeah, doing a remote would be a good idea. maybe try an unreliable remote event if you’re fine with some grass blades not animating

2 Likes

you don’t really need a remote event for this. from the client, you can detect when the player (and other players) touch grass, then tween, from the client. All without interacting with the server. If you were to tween things like doors, then yes you would need a remote.

3 Likes

it is best to simulate the grass tweening effect purely on the client . It is better for your network overall and the grass tweening effect is just a visual effect(not something that needs to be in sync)

3 Likes

Tweening on the client is definitely the best way to handle this. Since those tweens I assume won’t last long, you should use unreliable remote events.

I’m not sure where it detects interactions, but you should do that on the client for a even smoother look & send the tweens to other clients except the player that sent it.

1 Like

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