local Pfs = game:GetService("PathfindingService")
local human = script.Parent.Humanoid
local torso = script.Parent
local man = workspace:WaitForChild("Auxigin")
local cry = script.Parent.Cry
local idiot = true
local easy = true
local path = Pfs:CreatePath()
while wait(0.001) do
path:ComputeAsync(script.Parent.PrimaryPart.Position, man.HumanoidRootPart.Position)
local waypoints = path:GetWaypoints()
end
for i, v in pairs(waypoints) do
human:MoveTo(v.Position)
human.MoveToFinished:Wait()
end
if human.Health < 100 then
if idiot == true then
idiot = false
script.Parent.Head.face.Texture = "http://www.roblox.com/asset/?id=861024822"
script.Parent.Head.BrickColor = BrickColor.new("Bright red")
cry:Play()
wait(10)
human.Health = 100
cry:Pause()
script.Parent.Head.BrickColor = BrickColor.new("Lime green")
script.Parent.Head.face.Texture = "http://www.roblox.com/asset/?id=15175343"
idiot = true
end
end
This is the script, it doesn't work on a cube with eyes though, is there anything wrong? Or can pathfinding only be used with characters?

1 comment
Oh wow it was because I anchored it. I want to die.