How to make an helix(staircase) with math

So i wanna make an helix with math
this is the code i done so far

local circle = math.pi * 2

for i = 1,100 do
	local angle = (circle / 100) * i
	local x = math.cos(angle) * 10
	local y = math.sin(angle) * 10
	local z = 10 * angle
	print(angle)
	
	local part = Instance.new("Part")
	
	part.Parent = workspace
	part.Anchored = true
	part.Size = Vector3.new(5, 5, 5)
	part.Position = Vector3.new(x, z, y) + Vector3.new(10, 10, 10)
end

resutls :
cur

so when it gets longer it still does one circle but i want it to make multiple circles like a staircase does.

1 Like

just increase the number of steps (from 100), without changing the 100 on line 4

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.