Its inside a button...
function onHit(hit)
if (hit.Parent:FindFirstChild("Humanoid") ~= nil) and enabled then
Workspace.Zombie.CFrame = Workspace.Zombie.CFrame + Vector3.new(0.35,0,0)
end
end
script.Parent.Touched:connect(onHit)
Its inside a button...
function onHit(hit)
if (hit.Parent:FindFirstChild("Humanoid") ~= nil) and enabled then
Workspace.Zombie.CFrame = Workspace.Zombie.CFrame + Vector3.new(0.35,0,0)
end
end
script.Parent.Touched:connect(onHit)
Use the :MoveTo(Vector3.new(0,0,0)) function
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
Make sure that 'enabled' is defined, and also "CFrame" is not a property of "Model", so if "Zombie" is a model (not a "Part") then you can't set the CFrame of it.
what can I use instead of Zombie.CFrame to move the entire model