Okay, so what I am trying is to make a smooth UI opening filter, but this doesn’t seem to work…
Current Code
local Blacklisted = {"Divider", "Panel", "Panel1","BList"}
function FilterV2(Frame: Frame, Value: boolean)
for _,v in pairs(Frame:GetChildren()) do
--local Data = Blacklisted[v.Name]
if not table.find(Blacklisted, v.Name) then
local SelectedNumber = 1
wait(.1)
if Value then SelectedNumber = 0 end
if HubMain:CheckProperty(v, "Visible") then
v.Visible = Value
end
if v:IsA("ImageButton") or v:IsA("ImageLabel") then
Tween(v, .5, {ImageTransparency= SelectedNumber}):Play()
elseif v:IsA("Frame") or v:IsA("Button") then
Tween(v, .5, {BackgroundTransparency= SelectedNumber}):Play()
elseif v:IsA("TextLabel") then
Tween(v, .5, {TextTransparency= SelectedNumber}):Play()
end
if #v:GetChildren() >= 1 then
FilterV2(v, Value)
end
end
end
return true
end
Old Working Code
function fadechilds(Frame: Frame, Numb: number)
for _,v in pairs(Frame:GetChildren()) do
wait(.01)
if v:IsA("ImageButton") or v:IsA("ImageLabel") then
Tween(v, .5, {ImageTransparency= Numb}):Play()
elseif v:IsA("Frame") or v:IsA("Button") then
if v.Name ~= "BList" and v.Parent.Name ~= "BList" then
Tween(v, .5, {BackgroundTransparency= Numb}):Play()
end
elseif v:IsA("TextLabel") then
Tween(v, .5, {TextTransparency= Numb}):Play()
end
if #v:GetChildren() > 1 then
fadechilds(v, Numb)
end
end
end
function FilterInstances(Frame: Frame, Value: boolean)
for _,v in pairs(Frame:GetChildren()) do
if v.Name ~= "Divider" and v.Name ~= "Panel" and v.Name ~= "BList" then
if v:IsA("Frame") or v:IsA("ScrollingFrame") then
v.Visible = Value
pcall(function()
if Value then
fadechilds(v, 0)
else
fadechilds(v, 1)
end
end)
end
end
end
return true
end
Any Assistance would be appreciated as I have no clue.
local transparency1Names = {['hello']=true}
local transparency0Names = {['i become visible']=true}
for i,v in ipairs(instance:GetChildren())do
if transparency0Names[v.Name] and not transparency1Names[v.Name]then
for ii = 1,0,.1 do
v.BackGroundTransparency = ii
task.wait()
end
end
end
You’re just trying to merge the 2 functions right?
function fadechilds(Frame: Frame, Numb: number)
for _,v in pairs(Frame:GetChildren()) do
if v.Name ~= "Divider" and v.Name ~= "Panel" and v.Name ~= "BList" then
if v:IsA("Frame") or v:IsA("ScrollingFrame") then
v.Visible = Value
pcall(function()
if Value then
fadechilds(v, 0)
else
fadechilds(v, 1)
end
end)
end
end
wait(.01)
if v:IsA("ImageButton") or v:IsA("ImageLabel") then
Tween(v, .5, {ImageTransparency= Numb}):Play()
elseif v:IsA("Frame") or v:IsA("Button") then
if v.Name ~= "BList" and v.Parent.Name ~= "BList" then
Tween(v, .5, {BackgroundTransparency= Numb}):Play()
end
elseif v:IsA("TextLabel") then
Tween(v, .5, {TextTransparency= Numb}):Play()
end
if #v:GetChildren() > 1 then
fadechilds(v, Numb)
end
end
end
function fadechilds(Frame: Frame, Numb: number)
for _, v in pairs(Frame:GetChildren()) do
if v:IsA("Frame") or v:IsA("Button") or v:IsA("ScrollingFrame") then
if v.Name ~= "BList" and v.Parent.Name ~= "BList" then
Tween(v, .5, {BackgroundTransparency= Numb}):Play()
v.Visible = Value
pcall(function()
if Value then
fadechilds(v, 0)
else
fadechilds(v, 1)
end
end)
end
elseif v:IsA("TextLabel") then
Tween(v, .5, {TextTransparency= Numb}):Play()
elseif v:IsA("ImageButton") or v:IsA("ImageLabel") then
Tween(v, .5, {ImageTransparency= Numb}):Play()
end
if #v:GetChildren() > 1 then
fadechilds(v, Numb)
end
end
end
function Tween(Obj: any, Time: number, data: any)
local Data = TweenService:Create(Obj, TweenInfo.new(Time, Enum.EasingStyle.Quint), data)
return Data
end