The Platform That Drops You
Making a part vanish is two properties; making it come back reliably is where every bug lives. Step on the naive version twice in a second and watch the platform stay gone for the rest of the round.
Worth reading first: Doing It Once, When the Engine Says It Forty Times
Making a part vanish is two properties; making it come back reliably is where every bug lives. Step on the naive version twice in a second and watch the platform stay gone for the rest of the round.
Vanishing is two properties, not one
You met both in Part 1, and this is where the distinction earns its keep. Transparency controls whether the platform can be seen. CanCollide controls whether it can be stood on. Set one without the other and you get a bug that reads as physics being broken.
- 1Transparency = 1, CanCollide unchanged
The platform is invisible and still completely solid. Players stand on thin air.
- 2CanCollide = false, Transparency unchanged
The platform is fully visible and players drop straight through it. This one gets reported as 'the game is broken'.
- 3Both
It is gone in the only sense that matters — invisible and intangible.
local platform = script.Parent -- Goneplatform.Transparency = 1platform.CanCollide = false -- Backplatform.Transparency = 0platform.CanCollide = truetask.wait is the one to reach for
The pause between vanishing and returning is task.wait(seconds). It yields the current thread and resumes it on the first frame after the time has elapsed.
You will see wait() everywhere in older material. It is throttled to roughly 30 updates a second and drifts further as the server gets busier, so a wait(3) on a loaded server can be four seconds or more — enough that a platform timed against an animation stops matching it.
task.wait(3) -- resumes on the first frame after 3 seconds wait(3) -- the old global: 30Hz, and it drifts under loadTwo relatives are worth knowing. task.delay(n, fn) runs a function later without pausing the current thread, and task.spawn(fn) starts one immediately alongside the current one. Neither is needed here, and both are how you avoid a wait blocking something that should keep running.
Restoring it in the function that removed it
Put the whole cycle in one handler — remove, wait, restore — so that the code which took the platform away is visibly the code that brings it back. Splitting the restore into a second script or a separate timer is how a platform ends up permanently gone when one half fails.
With the debounce from the last chapter, the complete version is short.
local platform = script.Parentlocal busy = false local WARNING_TIME = 0.4local GONE_TIME = 3 platform.Touched:Connect(function(otherPart) if busy then return end local humanoid = otherPart.Parent:FindFirstChildWhichIsA("Humanoid") if not humanoid then return end busy = true platform.Transparency = 0.6 task.wait(WARNING_TIME) platform.Transparency = 1 platform.CanCollide = false task.wait(GONE_TIME) platform.Transparency = 0 platform.CanCollide = true busy = falseend)Note the order of the two guards. The debounce is checked first because it is cheapest, and the Humanoid check comes before busy is claimed — so a falling brick landing on the platform does not consume the cycle and leave the platform stuck for three seconds having done nothing.
What two players do to this script
The debounce here is one flag for the whole part, and that is the correct choice — but it is worth being clear about what it does and does not promise.
It promises that the platform runs one cycle at a time. It does not promise anything per player. If a second player steps on the platform half a second after the first, nothing new happens: the cycle is already running, and they get the remaining two and a half seconds rather than a fresh three.
That is right for this obstacle. A platform is a single physical thing and it cannot be both present and absent for two people standing on it — a per-player flag here would be strictly wrong, and the next chapter is about what happens when you try.
Telegraph it before it drops
A platform that vanishes with no warning is not difficult, it is unfair — the player had no information they could have acted on. Every well-made obby telegraphs, and the cheapest telegraph is the transparency step already in the script above.
Two more are worth the few lines. Colour communicates faster than transparency, and sound reaches a player who is looking somewhere else.
platform.BrickColor = BrickColor.new("Really red")platform.Material = Enum.Material.Neon -- A Sound parented to the part plays from its position in 3D.local warningSound = platform:FindFirstChild("Warning")if warningSound then warningSound:Play()endRemember to restore anything you changed. If the warning sets BrickColor, the restore has to set it back, or your obby slowly turns red one platform at a time as people play it.
Key takeaways
- Vanishing takes both Transparency = 1 and CanCollide = false. Setting only one produces invisible floors or visible holes.
- Use task.wait rather than wait. The old global runs at about 30Hz and drifts further as the server gets busier.
- task.delay runs something later without pausing you; task.spawn runs something alongside you. Neither is needed for a simple platform.
- Keep remove, wait, and restore in one handler, so the code that took the platform away is visibly the code that brings it back.
- Check the debounce first and the Humanoid second, but claim the flag only after both — or a falling brick locks the platform for three seconds.
- Name the durations as constants at the top. You will tune them on every platform in the course.
- One flag for the part is correct here: a platform cannot be present for one player and absent for another.
- Telegraph before dropping. A partial transparency, a colour change, and a sound cost four lines and turn an unfair trap into an obstacle.
- Restore everything the warning changed, or the course drifts permanently red as people play it.
Quick check
Answer these to unlock the next chapter — 3 of 4 to pass. You can retake it anytime.
Answer every question to check.
Make a free account to read on
Every chapter is free — an account is how your progress, XP, and streak follow you from your laptop to your phone, and how you show up on the leaderboard. No payment, no trial.