#Table not following the rules of nature herself
1 messages · Page 1 of 1 (latest)
i dont understand your wording
me neither
a instance list of every 41 Tools
when you use pairs combined with table.remove() you're likely skipping over indices. table.remove() is going to automatically shift the index of the table
add a shift variable i think and increase when you remove something
local shift = 0
for i,v in ... do
table.remove(ToolsTable, i - shift)
shift+=1
end
** You are now Level 10! **
u can do
ToolsTable[b.Name] = nil
try doing this
(Re-writing it to his idea rn)
its not, it wont skip over anything
ToolsTable[b.Name]=nil wont work unless ToolsTable is a dictionary but im pretty sure its being used as an array
you would have to do ToolsTable[i] = nil
oh mb, ur right with this
can i see your new code
oh try doing this
local shift = 0
for i=1,#ToolsTable do
local b = ToolsTable[i-shift]
local founditem = workspace.Settings.WorldName.BannedItems:FindFirstChild(b.Name)
if founditem then
table.remove(ToolsTable, i - shift)
shift+=1
print("...")
else
warn("...")
end
end
aight
i think the variable 'b' was also skipping over indices and you have to correct it with shift as well
👍
got 41 feedbacks
nice