Insert "while(!player){wait(1);}" in the beginning of the action sensitive_ents to assure that the pointer "player" is already valid.