Kreativ 58
Image: AI-generated

Guide · 26 November 2026

Roblox Studio: Moving Platforms with TweenService

By Liska, has been playing Roblox and Murder Mystery 2 for almost three years

Build a moving platform in Roblox Studio: anchor the part, set up TweenInfo, move it back and forth with TweenService:Create and Play(), and test with F5.

Contents

You build a moving platform in Roblox Studio from an anchored part, a script inside it and the TweenService: with TweenInfo.new you set the duration and the type of movement, with TweenService:Create you create the tween, and with :Play() you start it. If you set repeatCount to -1 and reverses to true, the platform moves back and forth forever. This guide is part of our Studio series and builds on the obstacle course (obby). You should have read Roblox Studio for beginners first.

As of 23 November 2026. On that day we checked six pages of the Roblox documentation (TweenService, TweenInfo, Tween, BasePart, Vector3, testing modes). Our own tips are marked as “Our tip”.

What a tween is

According to the page on the Tween class, a tween is created with TweenService:Create. The page on TweenService says you can use it to “interpolate, or tween” properties of instances (change them step by step from one value to another). For a platform, we change the Position property. The TweenService page shows Position in its examples with the value type Vector3.

Step 1: Build the part and anchor it

Build the platform as in the obby guide: insert a block and give it a size and a position. Then turn on the Anchored property in the Properties window. The page on BasePart says: “The Anchored property determines whether the part will be immovable by physics.” So an anchored part is not moved by physics. All three examples on the TweenService page also set part.Anchored = true for their part.

Step 2: Add a script

In our setup, the script sits inside the platform itself. Our tip: in the Explorer, hover over the part with your mouse, click ⊕ and choose Script. In the script, script.Parent then stands for the platform. The lava script in the obby guide works the same way.

Step 3: Set up TweenInfo

TweenInfo.new takes six parameters in a fixed order. The page on TweenInfo lists the types and default values:

  1. time (duration): default 1. According to the docs, the duration of the tween “in seconds”.
  2. easingStyle: default Enum.EasingStyle.Quad. It sets how the movement plays out. An example on the Tween page uses Enum.EasingStyle.Back.
  3. easingDirection: default Enum.EasingDirection.Out. According to the docs, the direction “in which the tween executes”. The example on the Tween page uses Enum.EasingDirection.In.
  4. repeatCount: default 0. According to the docs, the value -1 means it repeats forever (“-1 repeats indefinitely”).
  5. reverses: default false. With true, the docs say the tween runs back to the starting values after reaching its target (“Whether the tween should reverse to the starting values once it reaches its targets”).
  6. delayTime: default 0. According to the docs, the waiting time in seconds until the tween begins (“Time of delay until the tween begins”).

The pages we checked do not describe what the styles Quad, Back and the others look like. Our tip: change just one style and watch in the test how the ride changes. According to the TweenInfo page, TweenInfo.new reports an error if you use Enum.EasingStyle.Bezier or Enum.EasingStyle.Spring. Leave those two out here.

Step 4: Create the tween and start it

According to the TweenService page, the signature is TweenService:Create(instance, tweenInfo, propertyTable). It returns a tween. The table names the target properties. Here is the script for a platform that moves 20 studs (that is how Roblox measures distances) in one direction:

local TweenService = game:GetService("TweenService")

local plattform = script.Parent
local tweenInfo = TweenInfo.new(3, Enum.EasingStyle.Quad, Enum.EasingDirection.Out, -1, true, 0)
local ziel = {Position = plattform.Position + Vector3.new(0, 0, 20)}

local tween = TweenService:Create(plattform, tweenInfo, ziel)
tween:Play()

What happens here: the first line gets the service. The target position is made from the starting position plus a Vector3. The page on Vector3 lists the constructor Vector3.new(x, y, z) and the addition Vector3 + Vector3. The numbers 3 and 20 are our example values, not requirements from Roblox. The Tween page describes Play() with “Starts playback of a tween”.

Step 5: Move back and forth

In the code above, the back-and-forth movement is already built into two parameters. -1 for repeatCount repeats forever, true for reverses sends the platform back after it reaches the target. The TweenService page shows this pattern in its example “Looping a Tween”. There, the tween runs until it is stopped with Cancel().

What else you can control:

  • Pause(): Pauses playback. The docs say “Halts playback of the tween”.
  • Cancel(): Stops playback and resets the tween variables (“Halts playback and resets the tween variables”).
  • delayTime: With a delay, the platform only starts after the time you set. Our tip: give several platforms different values, so they do not all set off at the same time.

Our tip: in this setup, every platform gets its own script, because script.Parent always means the part the script sits in. Copy the finished platform together with its script and change only the position, the duration or delayTime.

Step 6: Test with F5 and Stop

According to the page on testing modes, you choose the mode in the dropdown and start with Play. Test (F5) places your avatar at a SpawnLocation or at roughly (0, 100, 0). Stop (Shift+F5) ends the test. Stop “resets all objects and instances to how they were before the playtest”. After that, the platform is back at its starting place.

Check three things in every test:

  • Does the platform move in the right direction?
  • Is the ride long enough for you to jump on comfortably?
  • Can you reach the next platform before the moving one drives away?

The pages do not say which duration and which distance suit an obby. You can only find that out by trying.

What remains open: riding along

Whether your avatar rides along on a tweened platform, or whether you need extra code for that, is not stated on any of the pages we checked. The Tween page says nothing about avatars and physics. Our tip: test it yourself with F5. Stand on the platform and watch your character.

Where the information comes from

All facts come from the English-language Roblox documentation in the Creator Hub:

  • TweenService: Create with its signature, the examples “Tween Creation”, “Looping a Tween”, “Pausing a Tween”, the target property Position.
  • TweenInfo: six parameters, default values, descriptions.
  • Tween: the example “Tween Creation” with Play(), descriptions of the methods Play(), Pause() and Cancel(), the example “TweenInfo Examples” with Back and In.
  • BasePart: Anchored as a boolean, the explanation “immovable by physics”.
  • Vector3: Vector3.new and addition.
  • Testing modes: Test (F5), Stop (Shift+F5), the reset after the test.

Conclusion

A moving platform needs an anchored part, a script inside it and a few lines with TweenService: get the service, set up TweenInfo.new, build the tween with Create and start it with Play(). With repeatCount -1 and reverses true it moves back and forth forever, and with delayTime it starts later. The pages we checked say nothing about duration, distances or whether the avatar rides along. Our tip: always change just one value and test with F5.

Frequently asked questions

How do I move a part in Roblox Studio with TweenService?+

You get the service with game:GetService(“TweenService”), set the options with TweenInfo.new and create a tween with TweenService:Create(instance, tweenInfo, propertyTable). The table names the target property, for example Position. The movement starts with tween:Play(). This pattern comes from the code samples in the Roblox documentation.

How do I make a platform move back and forth forever?+

In TweenInfo.new, set repeatCount to -1 and reverses to true. According to the documentation, -1 means it repeats forever, and reverses makes the tween run back to the starting values after reaching its target. The docs show this pattern in the example “Looping a Tween”. You stop the tween again with Cancel().

Which parameters does TweenInfo.new have?+

There are six, in this order: time (default 1), easingStyle (default Enum.EasingStyle.Quad), easingDirection (default Enum.EasingDirection.Out), repeatCount (default 0), reverses (default false) and delayTime (default 0). All six are optional because they have default values.

Does my avatar ride along on a tweened platform?+

The Roblox pages we checked say nothing about this. Our tip: try it out in your own obby with F5 and watch how your character behaves on the platform.

‹ back