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

How would I go about removing strings from an array instead of the index number?

Asked by 3 years ago

Because when players are going to be added to the table then it's all up to variables

1 answer

Log in to vote
0
Answered by
h8run 30
3 years ago

You can do a for i,v loop on the table and check if v is equal to the string then remove it using i.

for i,v in pairs(table) do
    if v == "StringHere" then
        table.remove(table, i)
    end
end
0
table.find exists AlexanderYar 788 — 3y
Ad

Answer this question