It does and it doesn’t at the same time.
The random value has to be generated every time you create things - otherwise it’s just the same value all the time.
Basically, if you move the code block from where you have it to “inside” the loop (copy and paste + use within the loop, you should get the result you are looking for.
Obviously that introduces an issue;
You can’t divide the spline length by a random number.
Probably substitute the max possible variable in there (car length + max random) so that you always have vehicles set up with values which are below that maximum distance.
Rendering or not - you can add an event as a bluetility, connect it to replace the OnBegin, and use that to just pace instances along the spline in a way that the editor saves them.
In case you need to re-open the scene and get the same stuff, you really should do that.
Personally, I’d just replace the instance code you have to work a bit different.
Add whatever objects or meshes you want to the level.
Give them the same gamplay tag.
Mod the script you have to get and loop all objects with that gamplay tag definition.
You can compute the max spline distribution and make the max a value that makes sense to the equation based on the total count: spline length / tot items = leftover value which / tot items = max possible random distance variable.
Min distance can be left as set, but you will need to check that min < max now.
Granted that is true, You then just use the instance loop to place the objects similar to what you had so far.
Once you click the bluetility button within the properties panel, the objects will get distributed in the level like if you had manually placed them - and if you save they’ll stay put whenever you re-open…
Which for all intensive purposes makes the whole thing far more usable, and eliminates performance concerns as well.