There was a semicolon missing after the variable declaration but otherwise this fixed the problem I was having, thank you VERY much.
Also a big thank you to jecrell for this very well written tutorial!
Code Select
if (Def != null && hitThing != null ) //Fancy way to declare a variable inside an if statement. - Thanks Erdelf.
{
Pawn hitPawn = hitThing as Pawn
if(hitPawn!=null)
Also a big thank you to jecrell for this very well written tutorial!