I'm trying to have my code wait a random amount of time. Why doesn't the code work when I put a variable in the wait prenthesis?

For example:
//
var x = 0;

x = random(5)*-1;

wait(x);
//