Nullref error in AIBase.Teleport

Im getting this error every now and then when calling Teleport:

bild

I’ve inspected the entire call-chain and it just seems tr is never assigned transform so its null.

EDIT: Solved by adding “hasBeenEnabled” flag to my AI script, and calling FindComponents manually if its false before trying to access AiBase.

1 Like