Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do i find a player in the player service using their name?

Asked by 3 years ago

anybody know how to do this? i just need to know because i need it for my game Thanks in advance

0
Hey, can you try to give us more details for your question? AntoninFearless 622 — 3y

2 answers

Log in to vote
1
Answered by 3 years ago

Easy enough.

game.Players:GetPlayerFromCharacter(plr.Parent)

or

game.Players:FindFirstChild(plr.Parent.Name)

or even

game.Players:WaitForChild(plr.Parent.Name)

But if you are using a local script,

game.Players.LocalPlayer
Ad
Log in to vote
0
Answered by 3 years ago

`game.Players:FindFirstChild("PlayerName")

?`

Answer this question