Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Broken Clone Script. Only moves one clone away, rest stay in one area. Why?

local block = game.ServerStorage.dirt_block
local number = 7
local rNumber = math.random(1, 2)
local pos = block.Position

local function copyBlock()
	local dirtCopy = block:Clone()
	dirtCopy.Parent = game.Workspace
	local workBlock = workspace.dirt_block
	workBlock.Position = pos + Vector3.new(number, 0, -5)
	wait(0.03)
	return
end

for i = 1, 10 do
	copyBlock()
	wait(0.03)
	number = number + 5
end

(the rNumber variable will be for random spawning, but i cant get that down without this first.)

1 answer

✓ Accepted answer

replace line 9 with

local workBlock = dirtCopy

This discussion is preserved as it was. New answers, comments, and votes are closed.