Hello, the topic name explains my problem. In my script, I set a frame in the UI to be visible and only 1 of the 4 objects inside it became visible (The other objects do have their visible property set to true as well). Except, when I go into the players UI and change any visual property (Position, Size, ClipDescendants, etc.) everything in the frame will become visible again. I dont want to have to randomly update the frames properties just to get it to become visible.
If anybody has any solutions that would be very helpful. If you want me to provide any other information I will try.
I started encountering this issue a few weeks ago, it may be a bug. What I ended up doing is after configuring the visibility, also set one of the UI properties on/off for it to update(I think it was UI.IgnoreGuiInset).
--configure visibility
UI.IgnoreGuiInset = not UI.IgnoreGuiInset --swap value
UI.IgnoreGuiInset = not UI.IgnoreGuiInset --swap again to the original
If it doesn’t work, try it for another property. Although I do consider it a silly solution.
Yeah I implemented one of those temporary solutions into my script for the moment. I did think it was a bug but unfortunately I cant report bugs on the devforums.
Also edit for my main post: turns out putting everything I had done into a new baseplate file means it is now working . I don’t want to have to do this as a solution though because my original file is published and it is just annoying.
local frame = script.Parent
frame:GetPropertyChangedSignal("Visible"):Connect(function()
for _, instance in ipairs(frame:GetDescendants()) do
instance.Visible = frame.Visible
end
end)
You could use the above code (albeit slightly hacky) to make sure every instance inside a frame has its visibility set to that of the frame as well. Be wary that only some UI instances share the “Visible” property so you may need to add a conditional to refine the search.
local frame = script.Parent
frame:GetPropertyChangedSignal("Visible"):Connect(function()
for _, instance in ipairs(frame:GetDescendants()) do
if instance:IsA("TextLabel") then --you can add more checks between the first check and the then statement
instance.Visible = frame.Visible
end
end)