ForEachLoop doesnt work?

That isn’t where you populate the array, that is what will occur on each instance of an array element. The GetAllActorsofClass creates its own array of actors that belong to a certain class within your level. Are you calling a class of blueprint that is already in the level when you place this blueprint in? If you just need that you can skip the append and bodys altogether and just plug that into a foreachloop. For example:

In the above picture, the volume I used is calling the construction script every time it is created or moved in the editor. It checks to see if blueprint_wallsconce is in the level and how many there are, then puts them into an array. I then take that array and run a foreachloop so that, for each wallsconce in the array, it will print string the name of the specific instance. This can be seen in the image below:

So, if you are doing a get all actors of class for a blueprint/actor class that you do not have any copies of in the level, it will return an array of 0, and if body’s does not have any variables stored in it, it is 0, so you are appending two arrays that contain 0 variables together, which would not provide anything to print string from.

The first code you placed didn’t work too. I have two GravBodys and the code is inside each one. I don’t know what is happening! Nothing works.

Now this doesn’t work too. It prints “Hello” but then it doesn’t print “A”!

I opened the for macro and it is empty!!! I think that that is the problem!

your macro for your ForLoop and/or ForEachLoop is empty? Did you delete the contents of it or was it just empty? If it just emptied, go to your launcher>library and select the dropdown menu under your engine version, then press “Verify”. See if that helps address the error.