Line trace by channel in c++ crashes my Unreal Engine when it hits an object, pls for the love of god help

I have an issue when I use the line traces by channel function on my C++ project.

When I use a line trace and it does not hit anything it runs the rest of my code like its supposed to.
However when it does hit something my whole unreal engine freezes and I have to close it by task manager and I have no clue why it is happening as I get no error message or anything due to me having to forcefully close it.

The ECC_GameTraceChannel2 is a custom channel I made for the line traces in my project.

Operations that return without error but get stuck are usually caused by infinite loops. Are you creating a loop somewhere using the data obtained from the trace? Also, if you paste the entire function I can try to help you better.

i feel so stupid now, thanks for that reality check on the code despite given you very little.

this was all designed for a weapon system and i was using a while loop with the the line trace in it and i apparently forgot to move one small line of code in the first place but thank you nonetheless and i now know in future how to solve this.