The problem i'm having here is the array "pad_vacant_preset" is empty even though its evidently storing 2 values.
local module = {}
t1 = {}
t2 = {}
padnames = {"one","two","three"}
pad_in_use_preset = {
brickcolor = BrickColor.new("Royal purple"),
material = "Neon"
}
pad_vacant_preset = {
brickcolor = BrickColor.new("Medium stone grey"),
material = "Plastic"
}
function module:setpads()
local pads = script.Parent.Parent:FindFirstChild("Pads")
for i,pad in pairs(pads:GetDescendants()) do
if table.find(padnames, pad.Name) and pad:IsA("Part") then
print(pad.Name)
pad.BrickColor = self.pad_vacant_preset[1]
end
end
return("pads are set")
end
return module
****

1 comment
^^ I dont have an issue with requiring it and running setpads() its just the arrays