Something happen when object near player?

Hey, do you know how to make something happen when an object near the player?
It’s like a slender game. When slender near the player, static appear

The object is enemy

If you want the static effect from the slender game, you might want to check the distance and increase the static as the object gets closer to the player.

Vector3.Distance - Unity - Scripting API: Vector3.Distance