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

How to read bool from table?

Hi, I'm working on a key card door system, and when the key card reader is touched, I would like the function to return true or false, reading from a table that looks like this:

local cards = {
	["a"] = false,
	["b"] = true
}

I can't quite figure it out, and any help would be appreciated.

1 answer

Figured it out myself, just run cards[hit.Parent.Name]

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