Fuel System Help

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve?
    Hey devforum, I’m trying to make a system where I can input and output fuel with a prompt from a fuel tank to a truck in a certain radius, of which both of the fuels from each object will go up/drain slowly, as well as a rope connecting to each point.

  2. What is the issue?
    The main issue here is with my somewhat basic knowledge of scripting, how do I detect what truck is in the radius as well as what truck should get the fuel if there are multiple instances of the truck?

  3. What solutions have you tried so far?
    I’ve looked on the internet and the devforum and I haven’t been able to find anything that relates too closely my situation, asking a scripter friend of mine didn’t get too many results either. If you could help me out with this it would be greatly appreciated!

Photos of my current setup:

Look into Region3 or Magnitude.

In this instance, I would put all trucks into a folder, then iterate through it finding the nearest magnitude to the tank.