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

[Really stupid and easy to fix probably] Why is the zombie not spawning in this area?

so the zombie spawns where the zombie is in ReplicatedStorage and not the Local Position

local enemy = game.ReplicatedStorage.Zombie

local function create()
	local position = Vector3.new(90, 500, 400)
	local copy = enemy:Clone()
	copy.Parent = game.Workspace
	enemy:MoveTo(position)

end

while true do
    create()
	wait(1)

end

1 comment

0

because ur moving the enemy not the copy on line 7 do copy:MoveTo(position)

1 answer

✓ Accepted answer

Hello!

The problem seems to be the fact that you are trying to move the "enemy" variable which is in ReplicatedStorage, you need to replace "enemy:MoveTo(position)" with "copy:MoveTo(position)".

The code should work when it will be like that:

local enemy = game.ReplicatedStorage.Zombie

local function create()
    local position = Vector3.new(90, 500, 400)
    local copy = enemy:Clone()
    copy.Parent = game.Workspace
    copy:MoveTo(position)

end

while true do
    create()
    wait(1)

end

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