I would confirm this that you used :MoveTo function only, which will like go to the direction of player without detecting any blocks. In order to fix this, you need to use pathfinding service
I might be wrong tho with expectations. But yeah by in the video, it shows like the npc going to the player without handling blocked paths.
local Distance = 100
local SCP999 = script.Parent
function getNearestPlayer(Player)
local hum = Player.Character:WaitForChild("Humanoid")
local humroot = Player.Character:WaitForChild("HumanoidRootPart")
if (SCP999:WaitForChild("HumanoidRootPart").Position - humroot.Position).Magnitude < Distance then
SCP999:WaitForChild("Humanoid"):MoveTo(humroot.Position)
end
end
while wait() do
for _, plr in pairs(game:GetService("Players"):GetPlayers()) do
getNearestPlayer(plr)
end
end