Skip to main content

Stage 8: Spinning KillBricks + timing

Course progressStage 8 of 10
~35 min
Before you start

Make sure the rolling rocks have a fair rhythm.

Build

a spinning SweepArm over a gap

Learn

how speed changes the feeling of a timing challenge

Ship

a spinner stage that is exciting, not impossible

The big idea

Timing obstacles are fun when the player can predict them. The SweepArm should move steadily so players can choose when to cross.

New words
rotation
turning around a center point
timing
choosing the right moment to move
tune
change a number until the game feels right

Build it

Step 1 — Build the path and arm

Build this part

SpinPath

Block
Open recipe
Size
20 × 1 × 12
Color
Medium blue
Material
Plastic
Anchored
✓ Yes

Build a far exit platform across a gap.

Build this part

SpinPivot

Block
Open recipe
Size
1 × 1 × 1
Color
Bright yellow
Material
Smooth Plastic
Anchored
✓ Yes
Place
Centered over the gap, in the same center spot as SweepArm
Target
SweepArm center

Make SpinPivot transparent if you want it hidden. This marker tells the script where to center the spinner.

Build this part

SweepArm

Block
Open recipe
Size
28 × 1 × 2
Color
Really red
Material
Neon
Anchored
✓ Yes
Place
Centered over the gap between SpinPath and the exit

Step 2 — Spin the arm

Insert a Script inside SweepArm:

local RunService = game:GetService("RunService")

local arm = script.Parent
local pivot = workspace:WaitForChild("SpinPivot")
local SPIN_SPEED = 35
local angle = 0

arm.Anchored = true
arm.CanCollide = true

RunService.Heartbeat:Connect(function(dt)
angle = angle + math.rad(SPIN_SPEED) * dt
arm.CFrame = CFrame.new(pivot.Position) * CFrame.Angles(0, angle, 0)
end)

arm.Touched:Connect(function(hit)
local humanoid = hit.Parent and hit.Parent:FindFirstChildOfClass("Humanoid")
if humanoid then
humanoid.Health = 0
end
end)

Press Play and watch the arm. Tune SPIN_SPEED until players can cross with good timing.

Step 3 — Add the Stage 9 checkpoint

Place the Stage 9 SpawnLocation after the spinner. Add StageNumber = 9 and the matching Team. Give this checkpoint the same settings as Stage 1 (check AllowTeamChangeOnTouch, uncheck Neutral, match the pad's TeamColor to its Team), and uncheck AutoAssignable on the new Team so players always start at Stage 1.

Understand it

The script keeps SweepArm anchored so it cannot fall or fly away. Every frame, it reads the current SpinPivot.Position and rotates the arm around that point. A Touched connection resets any player the arm sweeps into. This is a server-side world obstacle, so it does not need a client listener.

Try this

Learning beat

Try this

Three short experiments. Predict before you run, then test your guess.

Predict first

What happens if SPIN_SPEED changes from 35 to 90?

Compare

Find a speed that is tense but still fair.

Connect

Where else could a repeated tiny change animate your game?

Test your stage

  • SweepArm spins steadily.
  • Touching the arm resets the player.
  • Players can cross with timing.
  • The speed feels fair.
  • Stage 9 checkpoint works.

If it breaks

  • The arm does not move. Check the Script is inside SweepArm.
  • The arm passes through me without resetting me. Confirm the Touched kill block is inside the SweepArm Script.
  • The arm starts in the wrong place. Move SpinPivot to the center of the gap.
  • The arm falls away. Make sure the script says arm.Anchored = true.
  • The arm is too fast. Lower SPIN_SPEED.
  • The gap is too wide. Move the exit platform closer.
Coach demo

This is a good place to describe the VR fantasy: "Imagine grabbing the arm and riding it across." Keep that as a demo idea, not required student code.