Is there any way of finding out what a player's ID is in a server by using scripts?

Let's say if I went into a server, can I find out my player number by using a script?

I've tried searching for a solution to this but with no luck