I am making a Roblox game inspired by brainrot memes, and I need help scripting a guard NPC.
I already made the guard’s texture. The guard must have a front detection zone (cone-shaped / field of view) like in the drawing.
Guard behavior:
The guard moves randomly inside a room I built.
It must avoid objects and cannot walk through walls.
If a player enters the guard’s detection zone, a 2-second cooldown starts.
After the cooldown, a message appears in the center of the screen saying:
“You are dead.”
The guard continues to patrol randomly around the room.
I’m looking for someone who can script this system properly.
** You are now Level 1! **