Zombie = script.Parent
Player = game.Players.LocalPlayer
follow = false
while true do
if Player.Character.HumanoidRootPart ~= nil then
if Player.Character.HumanoidRootPart.Position - Zombie.HumanoidRootPart.Position <= 10 then
follow = true
end
end
if follow then
Zombie.Humanoid.WalkToPoint = Player.Character.HumanoidRootPart
end
wait(0.5)
end
i get the error message "Line 6:Attempt to index global "Player" (a nil value)

2 comments
Are you sure you aren't using a script?
i had this problem, all i just did is put the player variable inside the function or event and it worked, just put the player variable into the while true do loop idk if it will work lol