Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make an NPC that only moves when the player doesn't look?

Asked by 2 years ago
Edited 2 years ago

So I want to make an NPC that only moves when the player (character) isn't looking, like how SCP-173 models on Roblox do this. Do we have to use any services or stuff, and just show me some example code for this or link me to a tutorial as I couldn't find any.

2 answers

Log in to vote
0
Answered by 2 years ago

Welcome to Scripting Helpers nashdaar1!

What I would do to answer your questions would be to study 173 assets in the inventory and try to reverse engineer their scripts. While doing this, it might be a good idea to use the ROBLOX API to assist you to recognize what functions do.

ROBLOX API

I hope this answers your question!

Ad
Log in to vote
0
Answered by 2 years ago

umm you can use RayCast HumanoidRootPart LookVelocity

Answer this question