I wouldn’t suggest using Display Names for that; they won’t always be what you expect them to be. What you can do is add Actor Tags to those spheres; or, to automate that, just add an Int variable called Index in the sphere blueprint, expose it to be able to set a value in a viewport (there’s a small icon that represents the eye next to every variable in the list), and on begin play add a tag like “sphere” appended with Index.ToString(); And then check the spheres’ tags, not names, because tags will always be what you set them to be;
Alternatively, you can check indices themselves; since you already Get All Actors of Class, no Casting will be needed, Just If (Index == 5 || Index == 6) => do that, Else => do this.