I think the entity is not exist already if you call the problematic line. Set a "wait(-3);" before, maybe it helps...