Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Zombie not spawning in the correct position of my Zombie Spawner?

Asked by 6 years ago
Edited 6 years ago
local zombienpc = game.ReplicatedStorage:WaitForChild("Regular Zombie")
local spawner = game.Workspace.Spawners:WaitForChild("Zombie Spawner")


while true do
    local clone = zombienpc:clone()
    clone.Torso.CFrame = CFrame.new(spawner.Position) 
    clone.Parent = game.workspace
    wait(3)
end

The zombie seems to spawn in the Workplace but it does not spawn in the correct position I desire( which is spawner.Position )

0
clone.Torso:MoveTo(spawner.Position) TheGreatSailor 20 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

Change clone.Torso.CFrame into clone.HumanoidRootPart.CFrame. If your zombie doesn't have this part just make 1 for it and make it invisible. Torso is deprecated so expected problems: http://wiki.roblox.com/index.php?title=API:Class/Humanoid/Torso

Ad

Answer this question