So pretty much I have a value like this for example:
1 | local client = game.ReplicatedStorage.Client.Value |
How would I use it like this:
1 | game.Players. --the client value |
There are two ways you can come through this problem. One of them is :FindFirstChild()
. This will take an input of either a variable, or string (as long as the variable is a string) and will find a child with that name. The other way of doing it, is to use the parent as a table. Eg. game.Players[childName]
. In the brackets you would do the same thing as FindFirstChild with the variable or string.
Putting this together, you could use it as:
1 | local client = game.ReplicatedStorage.Client.Value |
2 | local plr = game.Players:FindFirstChild(client) |