Best way to move background objects?

I’m trying to figure out the best way to move objects in the background of a game.

I want to have a stationary platform and have everything else around it be moving one direction, giving the illusion that the platform is the one moving. Moving objects are cloned and placed at a random point ahead of the platform to add endlessness.

Currently, I have tweened each individual moving object. I’m looking for either a better way to go about this or reassurance that this is fine. Is tweening each individual object too taxing if there is a decent amount of objects to tween? I’m relatively new to scripting, so I want to make sure I have the best way to get this “endless moving background” effect.

Tweening the background map is a working solution. If you’re after other solutions, you could also move the parts using .Stepped (server side), .RenderStepped (client), :BindToRenderStep() (client).

My two suggestions if you’re worried about performance:

  1. reduce the map part count, either by deleting parts, or combining them into a single part, such as a mesh/union
  2. animate the map movement client side. If you are tweening server side, the game will have to send the position of the parts at each update. Which could lead in worse performance. For tweening client side, you’ll have to sync the map with the other players, but this removes the bandwidth load greatly.
1 Like

Okay, great! This is what I was looking for.