Procedural Generation now working how In runtime

Hey,

I watched a tutorial on procedural weapon generation. But the problem is the weapons on change when I move the object in the blueprint viewport and only appear in the runtime as the last weapon in the blueprint.

Here is a picture of my blueprint

Shown above is the randomization of attaching the components to the body of the weapon, but there is no randomization during the run time just the weapon last generated in the blueprint.

The last weapon it stops at is the weapon that is used in-game, but I want to be able to change the weapon to randomize each time the gameplay not when I move It in the viewport.

I hope this makes sense thanks :slight_smile:

I think you’re doing this in the construction script?

Just move all this code into the event graph, on begin play.