Assigning Player?

I’m new to programming and I’m trying to get my character to do the following

moveDirection.y = jumpSpeed;;
moveDirection.y -= gravity * Time.deltaTime;

How do I tell it do that to the character?

Thanks

If you put a script on the character you can inside it use its transform.position, which is its position in the world space.