NPC stopping and continuing

Hello! I have a monster jumpscare system. Basically, an NPC following you, and when it touches you, there will be a jumpscare. But there is a problem. I want the monster to start following you every 8 minutes, for 1 minute, and I do not know how to do it. Like, it will stop for 8 mins, and then he will start chasing you for 1 minute, and then stoping again for 8 minutes like in Piggy.


Please, help me!

For the “Following the player” part you will have to use Path Finding

while true do -- This loop should not cause lag.
wait(480) -- 8 Minutes
-- Put your pathfinding code here
wait(60)
--  Stop the npc path.
end

And there is some articles on the devfourm for the jump scare such as:

I hope this helps.

I have already the pathfinding code in the game, so it will destroy the system.

what do you mean by destroy the system?

1 Like

I mean, errors may appear in codes.

Why? If the pathfinding is working then all you need to do is add delays for when the pathfinding should/shouldn’t occur.

Alright then. I will try it then.