Help With Making A Power Grid

You may know the game satisfactory. If so then you may have an idea of how there power grids work with power poles. I was wondering how could I accomplish that kind power system with the power poles. I’m pretty clueless as to where I should start. Does anyone else know how could I accomplish this?

A good way to go about this would be to have, when a power pole is placed, it will check its distance from all other power poles. Then, for all power poles in range, there would be an int value for how much power they can carry, and another for how much they are currently carrying. That’s all I got.

Would I check the distance using magnitude?

I would use CFrame, but im dumb

Thanks for the idea I’ll try that right now