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

I want to make a zombie that follows you , but isnt working. What is wrong with the script?

Asked by 4 years ago

the script is a local script and its located in the zombie's humanoid

local i = game.Players.LocalPlayer
local e = i.Character
while true do
    if (e.Torso.Position - script.Parent.Parent.Torso.Position).magnitude <30 then
        script.Parent.WalkToPoint = e.Torso.Position
    else
        break
    end
end

1 answer

Log in to vote
0
Answered by 4 years ago

I think you should use a server script instead of a local script since this only follows the local player? On the server script, you could get the closest player to the zombie or a targeted player and make the zombie follow them.

0
ok , thanks Premiumlomaspra -3 — 4y
Ad

Answer this question