How to make a spiral staircase

From Goodblox Wiki
Revision as of 17:25, 22 June 2020 by Pizzaboxer (talk | contribs) (Created page with "__TOC__ == Introduction == This tutorial will show how the basics of how to make a spiral staircase. This is not intended to instantly make the perfect dream staircase for...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Introduction

This tutorial will show how the basics of how to make a spiral staircase. This is not intended to instantly make the perfect dream staircase for your map; it is only intended to give you the fundamentals so you can create your own according to your liking.

If you are looking for an instant working staircase, check on Free models in GoodBlox Studio. Most users will find their needs satisfied there. It is advised that you read How to Make Ramps to fully understand this tutorial.

Setup

You will need to have GoodBlox Studio open. In GoodBlox studio, you will need to have at least the Explorer window open.

Discussion

We will be doing the following things:

  • Creating a loop
  • Inserting a brick
  • Telling GoodBlox what the parent of that brick is
  • Naming that brick
  • Resizing that brick
  • Anchoring that brick
  • Assigning a value to a variable based on the loop
  • Rotating and positioning the brick based on the variable and the loop.

Script

local i = 0
for i = 0, 180, 1 do

	local p = Instance.new("Part")
	p.Parent = game.Workspace
	p.Name = "Brick"
	p.Size = Vector3.new(50,1,1) --[[change 50 to change the size of the stairs --]]
	p.Anchored = true
	p.CFrame=(CFrame.fromEulerAnglesXYZ(0,(i/25),0)+Vector3.new(0,i,0))
--[[change 25 to change the 'smoothness' of the stairwell --]]
	wait()
	end

Each time the loop runs, a new brick is shifted a little more, and is a little higher than the last. You can easily play with these figures to make the staircase smoother or more more rectilinear.