Should I use animations to move objects?

So I’m trying to have objects do a route in circles and since I’m relatively new to scripting I opted to just make the objects humanoid and give them an animation, my question now is. Would that cause a lot of lag? I’m planning to have like maybe 20 objects move around.

Use CFrame and Vector3. Depends if they are just parts or have actual humanoids…

Each one of them is a single part.

Why not use tweens? It’s quite simple and allows for very smooth animation.

1 Like

Tweening using TweenService and Lerping using CFrame:Lerp() are good methods to use, Lerping can be a bit less smoother than tweens though so I’d recommend tweens.

If your object isn’t a rig and you don’t want Health/JumpPower/WalkSpeed on it etc then you should try to use AnimationControllers for animating if you choose to keep using animations.

Keep in mind animations do take time to load however tweens can be performance changing when used on the server.

In order to not cause lag just ensure you do all the tweening on each individual client, doing on the server will most likely cause lag. Also, you could set up some system where the parts only move when the players is only close enough to the object, a simple magnitude test will suffice.

As said above I would not use humanoids and would opt for the other options, if you must have it be an animation please use Animation Controllers. Humanoids are a big cost on the server and animation controllers mitigate much of this.