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

Zombie dying when being moved?

I am making a Tower Defense game where a zombie is located in a folder inside of Lighting inside of Workspace. The Zombie is alive if directly placed in workspace and not being moved, but for some reason when I try to move the zombie from lighting to workspace the Zombie's health reaches zero. Heres the script:

local zombies=game.Lighting.Folder1
script.Parent.Round.Changed:connect(function(round)
	if round==1 then
		for i = 1, 10 do
			local enemy=zombies.Zombie:Clone()
			wait(1)
			enemy.Parent=script.Parent.Zombies
		end
	elseif round==2 then
			
	end
end)

Anyone know a solution?

1 answer

✓ Accepted answer

You need to make the Zombie's joints when it is moved into Workspace.

local zombies=game.Lighting.Folder1
script.Parent.Round.Changed:connect(function(round)
    if round==1 then
        for i = 1, 10 do
            local enemy=zombies.Zombie:Clone()
            wait(1)
            enemy.Parent=script.Parent.Zombies
			enemy:MakeJoints() -- Make the joints so it doesn't fall apart.
        end
    elseif round==2 then

    end
end)

1 comment

0

Thanks! This solves it!

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