-- Create Floor
local h = 0
while h < 5 do
wait()
local x = 0
local y = 5
local z = 0
z = z * 2
local g = 1
local PartZ = Instance.new("Part", game.Workspace)
PartZ.Size = Vector3.new(4,1,4)
PartZ.Position = Vector3.new(x,y,z)
z = z + 4
PartZ.Name = g
g = g + 1
PartZ.Anchored = true
h = h + 5
end
Not in Code:
Only one part tends to generate from instance.new(). I would like help understanding why my code does this. I am only generating parts on the z axis, so please help me.
:)
- IsaacFriend808
Re-edited by JC/JesseSong

3 comments
Nice answer. I accepted it!
Thanks :)
@JustinWe12, thanks for the input! The code at first had not worked, but I managed to get it working by changing how much 'h' was being added. Telling me I should not add variables like those inside the loop also helped me with my code, thank you Justin.