Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Script made by 1WeirdDood
- local NumSteps = 100 -- number of steps in the staircase
- local StepHeight = 1 -- height of each step
- local StepRadius = 0 -- radius of the staircase
- local TurnAmount = 360 -- degrees of rotation for each step
- local Direction = Vector3.new(0, 1, 0)
- local AnglePerStep = TurnAmount / NumSteps
- for i = 1, NumSteps do
- local Angle = math.rad(AnglePerStep * i)
- local x = math.cos(Angle) * StepRadius
- local y = i * StepHeight
- local z = math.sin(Angle) * StepRadius
- local Part = Instance.new("Part")
- Part.Anchored = true
- Part.Size = Vector3.new(5, 1, 5) -- brick size
- Part.Position = Vector3.new(x, y, z)
- Part.Orientation = Vector3.new(0, -AnglePerStep * (i - 1), 0)
- Part.Parent = workspace
- if i > 1 then
- local Weld = Instance.new("WeldConstraint")
- Weld.Part0 = Part
- Weld.Part1 = PreviousPart
- Weld.Parent = Part
- end
- PreviousPart = Part
- end
Advertisement
Add Comment
Please, Sign In to add comment