2nd. not sure but this code is exposing GetPosition() instead GetBonePosition(MyHeadPos, HEAD);.Exactly GetPosition() is crashing and throw exception when you use it without precaution. So before use GetPosition() make valid check. Make it like that will be safe and will not crash in any occurance: