Tween a part on Server Script or Local Script?

Howdy!

I was wondering if it’s better to tween a part via local script or server script. Would tweening it locally make it tween smoother and less performance heavy? Which way is better overall?

I making a platform that moves the player by using tween service. I am using AlignPosition and AlignOrientation on the platform which would follow another part that’s being tweened.

Thanks!

You should always do visual related stuff on the client

1 Like

Clients can process intermediate frames at a much higher rate than the server both in terms of physics and tweening which is dependent on Stepped frequency. Generally you should be performing tweens, as well as most visual effects, from the client.

In your current case you don’t really need to do the tween from the client. You’re simply trying to move a guideline part around but the actual platform is moved via constraints to match up to the position of the tweened part. You can do this from the server.

You should be just as concerned with the context behind what you’re trying to achieve rather than strictly trying to design for performance since that in itself is too narrow a scope to be able to appropriately determine what’s good for your situation.

2 Likes

Tweening and other special effects should be handled on the client. This is done to lighten the server’s load. Visual effects are usually not handled by the server (and should never)

1 Like

Thank you for the in-depth answer!

1 Like