I have made several instances of a prefab
object
cube
TheLight
When a ball collides with one object it should shut off the light (as it does if there is just one instance).
But when there are more objects i shuts off the light of the first object in the Hierarchy… instead of the one it collided with…
is there something like this.child(“TheLight”).GetComponent(Light).enabled(false) ?