I would like to have
local table = {"a", "b", "c"} -- etc.
local label = script.Parent.TextLabel.Text
--[[ what I would like to do next is take label and if label is equal to something in the table, do something (I know what and how I will do this next) --]]
I also do not want to use for i, ws in ipairs(table) do because that cycles through every situation and if it gets the other situations and the situation you want it basically skips over it.
Update: I figured out I could still use for
local table = {"a", "b", "c"}
local label = script.Parent.TextLabel.Text
local val = 0
for i, ws in ipairs(table) do
if label == ws then
val = 1
end
end
if val == 1 then
print("D:")
elseif val == 0 then
print(":D")
end

1 comment
I will accept this as well because it was more what I was looking for. Thanks!