Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

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

Asked by 4 years ago

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.

0
format it BashGuy10 384 — 4y

1 answer

Log in to vote
1
Answered by 4 years ago

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

Hope this helped

Ad

Answer this question