Hi,
I am trying to write a script to document all unique texture ids in my project, I am using an open source module TableCare to do this.
I have written the code below but it’s adding all texture id’s to the table and not adding if its been added before.
I have been trying to get working for the past few hours can anyone see what I am doing wrong?
local TableCare = require(game:GetService("ReplicatedStorage").TableConstructs)
local textures = TableCare()
-- Find all textures
for _,v in pairs(workspace:GetDescendants()) do
if v:IsA("Texture") then
local find = textures % {v, false}
-- not found so add
if #find == 0 then
print("not found adding to table " .. tostring(v.Texture))
textures(v.Texture)
else
print("Found in table so not adding")
end
end
end
print (textures .. ', ')