Earlier I had a script attached to my player for its movement using keyboard inputs. Then I decided to do the same thing using onscreen UI buttons so I created an empty gameobject inside my canvas and added the buttons to it and also attached a new script to it which would change the position of my player on pressing those buttons. But my buttons don't work for obvious reasons since I am not actually changing my player's position yet. If I were on the same gameobject like before I would simply do:
transform.position = <new position here>;
Can anyone tell me how to do this exact thing on another gameobject's script?