How do I make one script effect different blocks and models?

I’m trying to make a light script using collection service ; which was successful, but I really don’t want to have more then one script for all the lights I have, because all my other models have all the parts in the same block, but lamps I have don’t have have them all in one block, but instead in different ones.

How would I go about making the one script also effect the bricks not in the same model type?

You’re sort of lacking context here.

Can you show code you’ve tried that has failed, or specifically what structure you have for your lamps?

Sorry, I didn’t think it was gonna be that hard and someone could just tell me it.

I haven’t tried anything besides simple stuff like or and if and junk like that, which didn’t work. The regular light I have, all the things the script needs is in one block, but with the lamp the click detector and the light are separated so the script errors because there’s nothing in the block.