I don't know how to make a randomly generated staircase which randomly generates parts when you reach a certain block (which is invisible).

And if possible, is there a way that we add probabilities to

[math.Random(1,5)]

?

randoms = game.Lighting.Randoms:GetChildren()

randompart = randoms[math.Random(1,5)]:clone()

function onTouched()
	randompart.Parent = game.Workspace
	-- I was thinking that if we add vector it may work but it doesn't.
	then
	-- We put the same location but it is proportional to the previous object's location.
	-- For example the first one spawns at (10,20,10) then the next one spawns at (10,50,10) but it does it automatically.
end
script.Parent.Touched:connect(onTouched)