script and title should probably explain
local settings = require(script.Parent.Parent.ModuleScript) script.Parent.MouseButton1Click:Connect(function() script.Parent.Parent.CanvasPosition = Vector2.new(settings.frame[script.Parent.Name]) for i,names in pairs(settings.ignore()) do for i,v in pairs(script.Parent.Parent:GetChildren()) do if v.Name ~= names and v.Name ~= script.Parent.Name.."".."Song" then v.Visible = false end end end end)
the for i script is the one not working but i don't understand why
If your blacklist is a simple array then you're going about it wrong. If you want to check whether a part's name is in a table it should go like this:
local IgnoreList = { "Torso", "Head", "Left Leg" } for i,child in pairs(Character:GetChildren()) do if not table.find(IgnoreList, child.Name) and not child.Name == script.Parent.Name.." ".."Song" then child.Visible = false end end