Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How would I select one item in a table?

So lets say I have this;

playerParam = {
['Username'] = plr.Name,

['Id'] = plr.PlayerId
}

( Ignore the fact I haven't defined plr)

How would I be able to select one of these items in a table?

1 answer

✓ Accepted answer

There are two ways.

playerParam.Username or playerParam["Username"]

This is called indexing.

For more info on indexing and tables in general, please see this question.

2 comments

0

Thanks! So it's similar to the concept of ModuleScripts?

0

Module scripts usually return a table of functions, so yes.

This discussion is preserved as it was. New answers, comments, and votes are closed.