How to make randomly generated floats the same across multiplayer? (GPGS)

Is there any way to make randomly generated floats the same in different instances of a game in multiplayer? I am using Google Play Games Services to do real time multiplayer in my android app and there are cubes that are randomly instantiated. However, I need each opponent on multiplayer to have the cubes in the same place as eachother.

These cubes get randomly generated at the start, but must be the same for people on multiplayer. For example, my game allows two people to play eachother. Both of them need to see the cubes in the same place. Is there any way to do this?

Any help is greatly appreciated, thanks.

By definition, you can’t separately generate two random values and expect them to be the same.
So, you either need to generate the random value only in one place (on a server, or one particular client) and then send the value to all clients.
Or, you need to not have a truly “random” value, but one which is controllable: on the game start you could set a common seed value among all clients and use that to seed a series of numbers on all clients by using a common algorithm.