To get a player instance it's common to use :GetPlayerFromCharacter(character) but is there another way of getting it without the player touching an object?
✓ ANSWER ACCEPTED
Is it possible to a get player instance without :GetPlayerFromCharacter?
2 answers
✓ Accepted answer
Yes. It is possible. For the GUI, the GUI's parent is the player's PlayerGui and you can use this for example. However, there's much more way to do this and not only for GUI. Hope this helped!
local player = script.Parent.Parent -- This will get a player.
-- The code
You can just do like:
local PlayerName = "_____" --Name of the player you want to get
game.Players:FindFirstChild(PlayerName)
--It really works this way, trust me
1 comment
0
This also works, but it is specific.
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
uh no? you can just use game.Players.LocalPlayer
maybe its a server sided script
Yes, it is a server sided script.