help with my if statement in a class

if (_relayPickedup = 0)

The 'if' statement is working perfectly, your usage is incorrect. You are giving it a condition that always evaluates to 'false'. Try:

if (_relayPickedup == 0)