Menu
CoddyTech

One Stage

Lesson 2 of 21 in Coddy's Roblox Game: Endless Tower course.

The tower is built from stages: Models waiting in ServerStorage.Stages, where players never see them. Each is 16 studs tall. It starts on a white Start pad in the middle and ends on an Exit ledge at its top.

To use one, copy it with Clone and parent the copy to something in the workspace. The template stays in ServerStorage, ready to copy again:

local copy = stages.Bounce:Clone()
copy.Parent = workspace

The stages of a tower go together in one Model, so a whole tower can later be cleared in one go.

challenge icon

Challenge

Easy

Put the first stage of your tower in the world.

  1. Near the top: local ServerStorage = game:GetService("ServerStorage"), local stages = ServerStorage.Stages and local tower = nil.
  2. Write buildTower(): set tower to a new Model named Tower in the workspace, then clone stages.Steps and parent the copy to tower.
  3. Call buildTower() at the end.

Press Play: blue steps stand in the middle, ready to climb. Then Check.

Try it yourself

local Players = game:GetService("Players")
local Settings = require(game.ReplicatedStorage.Settings)

print("Each tower has " .. Settings.StageCount .. " stages")

-- Every player gets Wins on the leaderboard
Players.PlayerAdded:Connect(function(player)
	local leaderstats = Instance.new("Folder")
	leaderstats.Name = "leaderstats"
	leaderstats.Parent = player

	local wins = Instance.new("IntValue")
	wins.Name = "Wins"
	wins.Parent = leaderstats
end)

-- Lesson 2: One Stage goes here

All lessons in Roblox Game: Endless Tower

Practice on your own: Roblox playground