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

What is wrong with this simple script?

Asked by 11 years ago

Its inside a button...

1function onHit(hit)
2    if (hit.Parent:FindFirstChild("Humanoid") ~= nil) and enabled then
3        Workspace.Zombie.CFrame = Workspace.Zombie.CFrame + Vector3.new(0.35,0,0)
4 
5end
6end
7script.Parent.Touched:connect(onHit)
1
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. duckwit 1404 — 11y
0
what can I use instead of Zombie.CFrame to move the entire model Shaydesilva 85 — 11y

1 answer

Log in to vote
3
Answered by
aews5 15
11 years ago

Use the :MoveTo(Vector3.new(0,0,0)) function

Ad

Answer this question