How to transform a gameobject that's not a child?

I have a player gameobject on a cube. The cube will rotate. The player is not a child of the cube. How will I update the player’s position and rotation as the cube rotate?

Hi, you can save the transform of the cube in one variable in the void Update to save every frame and then you can send the variable to your character script, if you dont know how to do this you can read this topic: Having scripts interact - Questions & Answers - Unity Discussions