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

How would I get a value for something in a table?

I basically have something with the following code:

local paidRoles = { ["Pilot"] = (gamepass id), ["Advanced Mechanic"] = (gamepass id), ["Advanced Gun Dealer"] = (gamepass id), }

I need to do something to the the gamepass ID of it, without doing i,v in pairs(paidRoles).

for example, something like paidRoles[Pilot].Value.

1 comment

0

format it

1 answer

You can simply do paidRoles["Pilot"] and it'll return the gamepass ID for the Pilot.

Hope this helped

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