Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to make a stalking NPC? (Like Stan in Identity Fraud (I think that's his name))

I have searched the internet for an answer, and I think I need rays for this to work. Sadly, I have no knowledge of rays. I have tried ray tutorials but none seem to work... thank you for listening.

Any help, even a post, would help. Thank you!

4 comments

0

first you need to use math.random to make him pop up randomly and just use clone to make him spawn

0

Thank you! Quick other question, I also want the stalking NPC to disappear if a player sees him, like if the player camera sees this NPC, it will quickly dissapear after .5 seconds.

0

find a tutorial on worldtoscreenpoint ive used it but it works differently in other scripts

0

what kind of game are you making? it sounds cool

1 answer

✓ Accepted answer

local npc = game.Workspace.npcname

local randomspawn = math.random(1, 10) --put in any number you want to wait for him to spawn

while true do

wait(randomspawn) npc:Clone()

4 comments

0

make sure its a pathfinder npc

0

and you can use cframe to make him spawn at the player but im way to lazy

0

Thank you for your replies! I have accepted your answer. Have a nice day!

0

thank you

This discussion is preserved as it was. New answers, comments, and votes are closed.