Yes, I know that was a long title. Sorry! But anyhow, this one should be pretty simple. Say I had a 1 person server. If I wanted to get the player himself from game.Players using the following code, how would I be able to script it without it being considered a table?
local plr = game.Players:GetPlayers()
As an example, if I needed something specific from the user, such as his unique user ID, how would I get the user data instead of a table with only him on it?
local key = "user_" .. plr.userId
I tried this in a bit of code I made for my game, and I end up getting a related error.
The error states: "Workspace.script:line#: attempt to concatenate field 'userId' ( a nil value )"
Concatenation is a term used with tables, hence why I made the assumption that it's being read as a table and not the specific user.
I hope this makes sense! Thanks for the help in advance.

1 comment
LOL. ok! I didn't know that the playeradded function kept running too until all parts of it are completed, veryyy nice to know!