I know that getting a Player's username in a local script is easy, BUT I'm running a function that needs to be ran in a script. How would I get their name?
Current script I have:
local PlayerId = game.Players:GetPlayerByUserId() -- Trying to get their Id
local PlayerName = game.Players:GetUserIdFromNameAsync()
print(PlayerId)
print(PlayerName)
This is an example of how I would think of using it but it doesn't seem to work

1 comment
Hi, I have no idea how, but I would appreciate it if you could show me the script as I am testing some scripts for a big game I would like to create.