You need to do the randomizing bit first only in the server (Actually it doesn't matter if it's the server or one of the clients, just that make randomizing only on one computer. But make it in the server so it follows the way how it is usually done by people.), then inform the clients of the results with publicVariable and make them all put the result into use.
I'll not give you a script but give you hints: you can make it in a single script where clients are forced to wait until the server has done the randomizing stuff, then make the server publicVariable the result to others, have a delay to ensure all got the result properly and then make them do the stuff.
Also, to check which computer is the server: throw in a game logic (or use an existing one if you already got one in there) and check if it is local. Game logics are local to server only.