how to make lights only turn on when player is nearby

the title speaks for itself, i’m new with Unity 3D and trying to make something that may or may not be good. so…
i where setting up the lights im using, in form on some flames and stuff, as it turns out those flames just keep bruning away there animation, even when the player is on the other side of the map, this is causing a lot of lag. i tryed some things but none have worked yet. (or i’m just bad at stuff:neutral: ) so, are there anyone out there that got a script that makes it so the lights only turn on when the player is nearby?

thanks in advance.

Give this script a try:

https://www.dropbox.com/s/fswjrxd8gaj47z4/LightTrigger.cs

If you need more help, I’ll be around :slight_smile:

thanks :smile: