If one of the blocks are missing than this should clone the block.
I manually :Destroy()-ed one of the blocks but it didn't generate.
The Indented one is up there
and the one in Lua Script(this is all 'cause #StackEdit)
is over here
local block = {
"Lucky Block1",
"Lucky Block2",
"Lucky Block3",
"Lucky Block4",
"Lucky Block5",
"Lucky Block6",
"Lucky Block7",
"Lucky Block8",
"Lucky Block9",
"Lucky Block10",
"Lucky Block11",
"Lucky Block12",
"Lucky Block13",
"Lucky Block14",
"Lucky Block15",
"Lucky Block16",
"Lucky Block17",
"Lucky Block18",
"Lucky Block19",
"Lucky Block20",
}
local num = 1
while true do
print(block[num])
if not workspace.Blocks:FindFirstChild(block[num]) then
local serverstorage = game:GetService("ServerStorage")
local block = serverstorage:WaitForChild("Lucky Block")
local clone = block:Clone()
clone.Parent = game.Workspace.Blocks
clone.Name = "Lucky Block"..num
clone:MoveTo(Vector3.new(math.random(-253.171,261.659),6,math.random(-513.762,514.205)))
end
if num == 20 then
num = 0
end
num = num + 1
wait()
end
Thanks

1 comment
P.S. I don't know how to use the for loop