How do i make an AI that can only walk/run in shadows?

i’m starting to make an apocalyptic open world survival game and decided to make a zombie AI script. I’ve tried for a fair while trying to find answers on google but there has been no luck.

PLEASE HELP!!!

Thanks :slight_smile:

There is no code that can detect shadows. My recommendation is to have an area where there is shadows as a trigger and if the zombie leaves, he dies. I’m not sure if this is exactly what you want but there is no code to detect shadows.

Sorry!