This might be an issue with Roblox. I would try restarting studio.
yes, to work with all frames at once
From the screenshot it looks like Inventory is your main frame. Is that correct?
I’ll be adding more frames, this is just the beginning
Is the screenshot inside StarterGui?
yes this screenshot inside startergui
Have you tried using print statements to see if the code is being executed?:
local function CloseFrames()
print("function executing!")
for _, frame in Frames:GetChildren() do
print("getting children")
if frame.Visible then
print("if statement passed")
TweenService:Create(Camera, info1, {FieldOfView = 70}):Play()
TweenService:Create(Blur, info1, {Size = 0}):Play()
frame.Visible = false
end
end
end
for _, frame in Frames:GetChildren() do
frame.Close.MouseButton1Click:Connect(function()
print("click detected!")
CloseFrames()
end)
end
local function CloseFrames()
for _, frame in Frames:GetChildren() do
if frame.Visible then
TweenService:Create(Camera, info1, {FieldOfView = 70}):Play()
TweenService:Create(Blur, info1, {Size = 0}):Play()
end
frame.Visible = false
end
end