You also forgot to put digitalWrite(RelayPin, RelayState); anywhere. Since you never write to it, it stays LOW.