Never mind, I found out my code was right, the remote procedure call wasn't working for some reason.

Thanks anyway.