What am i doing wrong when i hit my actor it checks to see if it was the head or not but its giving me an error

FHitResult does NOT have a function called BoneName at all. However it has a member variable BoneName which you can access and use. Take another look at to documentation page, it lists the BoneName under the Variables section not the Functions section.

In your code above you probably wanted to compare the Hit.BoneName against the FName “head”. To do that (and solve the error) all you need to do is translate that to code

if (Hit.BoneName == TEXT("head"))

P.S.: You can use

 tags to post code instead of having to take, edit and upload a screenshot everytime :)