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)
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)