MZ How to set character's ScreenXY Position to variables with a script?

I would appreciate it if you could let me know both for the event and the player!
Just as a tip: MZ and MV have been out for years, so all basic questions have already been asked. You'd quickly get an answer if you Googled "rpg maker mz script call x y" or something like that 😉

There's also a pinned thread with all of the engine's script calls:

It's the same for both, screenX() and screenY()

So, for example, $gamePlayer.screenX() or, inside an event, this.screenY()

There are also event commands for this, so the odds are good you might not need to be using code.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-set-characters-screenxy-position-to-variables-with-a-script.157469/