local Players = game:GetService("Players") local player = game:WaitForChild(Players[script.Parent.Parent.Value.Value])
The Value is a string value containing the player's name. but the error i'm getting says that preston1196 is not a valid member of Players. So it can't find my username in the Players.
I did a bit of messing around and found out a space got into the string and thats what caused it not to find it.
You're doing game:WaitForChild(...)
You should do
local player = Players:WaitForChild(script.Parent.Parent.Value.Value)
I assume that "Value" is a StringValue
The problem is Value is a Property, so use :WaitForChild()
Try either one
local player = Players:WaitForChild(script.Parent.Parent:WaitForChild("Value").Value)