Spawn Models in a straight line (Z-axis)

Heyo,

I’ve been trying to create a roblox game where it would have randomized stages and I want to achieve spawning stages (models) in a z-axis straight line where the script pieces them together in a line. I have tried piecing them up but they all have various lengths on the z axis.

1 Like

Try setting up two transparent, non collidable and anchored parts for each stage, one at the start and other at the end. Them group it and set the “start” part to be the Model’s PrimaryPart.

Then it will be quite simple, clone the stages randomly, and use Model:PivotTo() for each stage to be in the “end” part of the previous one. It’s the most performant way to move Models.

EDIT: it will work in any direction. Imagine you are creating a puzzle or a lego :slight_smile:

1 Like

tysm dude, really appreciate it. It works perfectly!

1 Like

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