how to repeat code in Function for different things



The thing I am trying to do is use the array to spawn tracks sections from the blueprint using Spawn actor BP_Straight 0,1 and 2. it has to be in the same function and I’m wondering on what to do so that it works