Utilities 5 min read

Design Moving and Disappearing Platforms

Learn how to build a rideable shuttle and a timed platform that warns players before disappearing.

Choose the movement type

Make ShuttlePlatform an unanchored Part. Use AlignPosition to move it and AlignOrientation to keep it level. For heavy builds, tune the force and settling time with a player standing near the edge. Leave enough distance above and beside the shuttle to avoid trapping avatars as it moves.

Signal a platform's state

Set the warning color as soon as the platform detects a character. A short wait makes the color meaningful. Disable collision only when the warning ends. Restore the visual and collision properties at the end of the reset period. Keep a busy flag so several limb touches cannot start several timers.

Test the course at normal speed

First use a safe floor beneath the whole course. Ride the moving platform both ways, stand on the warning tile, and try jumping off as it fades. Tune the warning time by walk speed and distance to the next safe landing.

Block out the shuttle route before coding

Create a start ledge and an end ledge facing each other across a gap. Put the shuttle slightly below the upper surface of the ledges so the avatar can step on without hitting the side. Leave room for the character's head and allow space past each end of the moving piece. Use a wide shuttle at first. A narrow one adds a balance challenge and makes it harder to judge the movement itself. If you plan to add scenery, keep the test route clear until the platform can travel the full distance in both directions. In Studio, move the part to the intended first position and give it the name ShuttlePlatform.

Understand what the constraints are doing

The shuttle relies on two constraints with an attachment. AlignPosition pulls the assembly toward its calculated position and AlignOrientation holds its rotation steady. The script chooses the next target from an eased cycle, while the constraints make the unanchored part follow that target. Restrict its assembly to the object you actually intend to move. A weld connecting it to an anchored wall would stop the assembly from following the target. During a test, inspect the attachment and both constraints and check that the actual location follows the target. If the platform falls away, look at its anchored state, attachments and force settings before changing the travel calculation.

Choose a movement curve and a usable crossing

A repeating cosine gives the platform a slow turn at both ends. It travels faster in the middle, but you avoid an immediate reversal in direction at either ledge. Adjust the cycle time and distance separately. Make an eight-second loop before trying a faster one so players have a predictable boarding window. Measure how long a new player needs to notice that the platform is coming back. If it is difficult to board, change the design to include a deliberate stop at the ledge. A brief flat section in the schedule is easier for a beginner than a platform that always keeps moving. Remember that changing both the distance and cycle time at once makes it harder to diagnose a rough ride.

local fraction = (1 - math.cos(elapsed * math.pi / 4)) / 2
local target = startPosition + Vector3.new(24 * fraction, 0, 0)

Prototype the vanishing tile on a separate lane

Add BlinkPlatform somewhere the player can step off it in two directions. Match the top surface to the adjoining floor, and leave the next safe landing close enough for a normal jump. The script starts a timer when a character contacts the tile. During the warning interval, it changes color while keeping collision so the player has time to move. After the warning ends, the tile changes its visibility and collision state. Keep the same warning color throughout this course so players learn one predictable cue. If a second touch starts an overlapping timer, enable the busy flag before waiting. Finish restoring the original state before accepting another activation.

Playtest the two mechanics together

Start by standing in the middle of the shuttle for an entire loop. Next, try boarding at one side, then try riding with two characters. Look for slipping or a sudden bump at the turnaround. On the timed tile, try waiting through the warning, jumping at the last moment and running directly across. Give a new tester a chance to walk the route without telling them when the tile will vanish. If their first attempt fails because the role of the color cue is hard to understand, change the cue before making the timing easier. Once both pieces feel predictable alone, place a disappearing tile near a shuttle stop and see how their timings interact.

Related scripts