← Roblox · All tutorials

Roblox

Script a Disappearing Platform in Roblox Studio

By JFG News Writer · Updated Nov 5, 2026
Stone platform dissolving into crystal shards over a void
Illustration: JustForGamerz

Parent a Script to an anchored Part and loop Transparency/CanCollide so the platform vanishes and returns on a timer.

medium30 minRoblox Studio (Creator Hub intro-to-scripting tutorial, current as of Nov 2026)
0/6 steps done

Requirements

  • Roblox Studio
  • A Part named DisappearingPlatform with Anchored set to true
  • A gap players cannot easily jump without the platform

Steps

  1. 1

    Place and anchor the platform

    Insert a Part, rename it DisappearingPlatform, resize it so a player can stand on it, and move it over a gap. In Properties, set Anchored to true so it does not fall.

  2. 2

    Insert a Script under the Part

    In Explorer, hover the part, click +, insert a Script, and rename it Disappear. Delete the default code. Scripts parented to a Part run when that part loads.

  3. 3

    Reference the part with script.Parent

    Start with: local platform = script.Parent. That variable points at the Part containing the script.

  4. 4

    Write disappear and appear functions

    Create a disappear function that sets platform.CanCollide = false and platform.Transparency = 1 so players fall through an invisible platform. Create an appear function that sets CanCollide back to true and Transparency to 0.

  5. 5

    Loop forever with waits

    Add a while true do loop that calls task.wait(3), disappear(), task.wait(3), and appear(). Never run a while true loop without a wait—Studio can freeze.

  6. 6

    Playtest the timing

    Playtest and confirm the platform disappears after a few seconds, then returns. If you duplicate platforms across a wider gap, stagger each script’s wait times so they do not all vanish together.

Tips

  • Transparency ranges from 0 (visible) to 1 (fully invisible).
  • Destroying the part would prevent it from reappearing—toggle properties instead.
  • Final reference pattern matches Roblox’s official intro tutorial code structure.