How to get player instance

How do I get a player instance Of a specific player via a player username or player ID?

You can do Players:GetPlayerByUserId(id) to get a player by ID. You can use Players:FindFirstChild(name) to get a player by name

3 Likes

Ah yes that’s what I first got but I got zero as return but then I realised you can only do it in a server script

What do you mean by “You can only do it in a server script”. You can use both GetPlayerByUserID and Players:FindFirstChild() in server scripts and local scripts.

idk it didn’t work for me on a localscript because then I get 0 in return