Hello, I’ve recently begun to be interested into learning unreal engine, and currently I’ve been following this tutorial made by a YouTube channel called “gorka games“ for creating a basic soul-like prototype using blueprints. currently I’m on the “target lock“ section of his tutorial and I managed to get the target lock itself to work, however for some reason a second instance of the icon spawns in the geometry underneath where the default character spawns, and there doesn’t seem to be an actor there that would trigger it.
Additionally, while clicking again on an enemy it disengages and the icon despawns like I’ve programmed it to, the second instance will never despawn, and while this second lock on is active both will begin to flicker.
reading the message logs it shows a repeating blueprint runtime error: “accessed none trying to read (real) property ‘target lock actor’ in BPC_combat“. Looking online one suggestion I’ve seen was to use an “is valid“ node to fix it, however I’m not quite sure where in my blueprint I would place it. If anyone more experienced than me would be able to provide some insight or is able to provide an explanation that would be greatly appreciated!
https://youtu.be/Hs2sM7eFf6Q?si=C7lb8iTduMDfxj4e
Hey @ThisKidRghtHere! Welcome to the forums!
An important piece of information here would be: Does that widget exist BEFORE you’ve locked on to anything? Is it there at game start? It may be that if you have a widget component you’re using for this, it needs to be set to “Hidden in Game” or something to that effect!
Also, when reading those message logs and getting the “Accessed none” issue, you can click on the magnifying glass to take you to the specific node where the issue is located.
I think it’s possible that both of these problems are simply happening in a different location in the code than you’re thinking, which is why you’re having a hard time! Try both of those things and get back to us! 
Hello @Mind-Brain and thank you for the quick reply!
To answer your question, I’m assuming that what you’re asking is when I start does the second instance of the icon already appear in the level as I play. the answer is no, the widget does not appear instantly, however this only happens if I successfully lock on to the enemy without missing. if I miss, then that’s when this second instance starts appearing and errors start occurring. the second instance will appear even if I don’t look at where this second icon spawns, if I simply attempt to lock onto something without having something to lock onto, then this glitch occurs.
It’s not like my character faces this second icon like it does if I lock onto an actual target, the icon just appears.
Also, I was aware that the message logs could bring me to the specific node, but thanks for the tip! the message logs claim that the “spawn actor “ node is what’s causing the issue, which is highlighted in orange. I’m not exactly sure what I did wrong in this section specifically to cause this to occur.
finally I would like to try your suggestion about the “hidden in game“ setting that you mentioned however since I’m so new with this software I’m not quite sure where I would find it. I tried searching for it in the details sections of where I thought it would be but no luck. if it would not be too much trouble do you tell me where to find it? I hope that last thing isn’t too much of a handhold-y request. I really appreciate all the help you’ve given me so far and hope you respond soon!
You shouldn’t have to worry about “hidden in game” based on the rest of the info you gave me! But it would be in the actor’s widget’s details.
After you said that it does this when there’s nothing to lock on to, that said what we needed to know!
You need to do an “IsValid” check on the “Target Lock Actor”. Basically that’s saying “At this point, check and see if there is a “Target Lock Actor” to spawn the lock-on to.” Because what’s happening is it’s spawning it but there’s no actor to lock onto so there’s an error with the spawn location, and it’s going to 0,0,0 for that reason. So just make sure there’s an actor! Also you should connect the return value of that branch, otherwise it’s pointless. 
Hope that helps!
Hey @ThisKidRghtHere , did you get it figured out? Let us know where you’re at with this! 