Ok, so I've been trying to figure out how I would call a function with parameters on a table, like this:
local Test = {1,2,3}
function Test.Find(Element)
for _,v in pairs(Test) do
if v == Element then
return v
end
end
return nil
end
print(Test:Find(2))
It kept printing nil and I eventually troubleshooted and found out that no matter what I put Element as, Element would still end up being table Test. How would I edit this so that it does what it's supposed to do?

2 comments
Thanks again! I've been having a little trouble with tables recently and I just wanted to clear things up
People usually neglect to explain methods in Lua explanations, so it tends to confuse people when they come up