I am making a game centered around players dodging moving parts that deplete their health if they touch them. I don’t know the best way to code this. Would I want to make the parts move on the client or the server? How would I move the parts? I am think about using TweenService but I am worried about it affecting performance.
I have tried to post the above topic before but I did not get lots of answers, so I am going to try to explain it differently. Say I wanted to make a door, and when a player touched it, that door would open for all the players in the server. How would I do this?
It’s probably best to move the Parts on the server so you would get less lag for each player, but the issue there would be that you’d likely need to create the Parts on each server. If you had a large area with moving Parts each player would only see their Parts and react to those ones which might look confusing to other players in the same area dodging their own Parts.
As listed on the TweenService | Roblox Creator Documentation page, it doesn’t get used for physics base movements like BodyMovers if you’re using those to get the Parts to move. If you are using CFrame to move them from one point to another then by all means use Tweens. If you are planning on having the Parts change direction in the middle of a Tween then it might not be the best idea though since the tween would already be trying to move the Part from point A to point B so it’d have to get to point B before you could properly change its direction.