local tool = script.Parent local RunService = game:GetService("RunService") local function onActivated() local zombie = game.ReplicatedStorage.Zombie local human = tool.Parent.Humanoid local mouse = game.Players.LocalPlayer:GetMouse() local e = Instance.new("Explosion") e.DestroyJointRadiusPercent = 10 e.Position = mouse.Hit.Position e.Parent = workspace local part = Instance.new("Part", workspace) part.Position = mouse.Hit.Position local clone = zombie:clone() clone.Parent = workspace local chaclone = clone:WaitForChild("Character") if chaclone.HumanoidRootPart then clone.HumanoiRootPart.Position = part.Position end end tool.Activated:Connect(onActivated)
try this:
local tool = script.Parent local RunService = game:GetService("RunService") local function onActivated() local zombie = game.ReplicatedStorage.Zombie local human = tool.Parent.Humanoid local mouse = game.Players.LocalPlayer:GetMouse() local e = Instance.new("Explosion") e.DestroyJointRadiusPercent = 10 e.Position = mouse.Hit.Position e.Parent = workspace --[[ this but isnt really needed unless you're creating something other than your zombie at the mouse.Hit.position local part = Instance.new("Part", workspace) part.Position = mouse.Hit.Position ]] local clone = zombie:clone() clone.Parent = workspace local chaclone = clone:WaitForChild("Character") if chaclone.HumanoidRootPart then clone:MoveTo(mouse.Hit.Position) -- clone.HumanoiRootPart.Position = part.Position end -- end <<-- this needed?! tool.Activated:Connect(onActivated)
just swapped out moving its HumanoidRootPart
with the inbuilt Model:MoveTo(Vector3)
Hope this helps! :)