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

Looking for Player's name from String value?

Asked by
iFlusters 355 Moderation Voter
8 years ago

I have a StringValue which gives has the players name stored in it, and I'm trying to get the player's name from Players using the value in the String.

local PlayerName = script.Parent.Sensor:WaitForChild("Name").Value
local Player = game.Players:FindFirstChild(PlayerName)
1
Simply switch line two out with this: local Player = game.Players:FindFirstChild(PlayerName) LateralLace 297 — 8y
0
Ah yah, stupid mistake of mine. iFlusters 355 — 8y
0
So does it work now? LateralLace 297 — 8y
0
Yes iFlusters 355 — 8y

Answer this question