Why when I clone in the studio it works the Automatic Canvas Size but when I test it in game, it doesn’t work?
EDIT: It works if from the first time it’s visible (Children inside Scrolling Frame), but if I make it visible = false and in game i make it Visible = true, it doesn’t update the size. How to fix?
local frame = script.Parent
local layout = frame:FindFirstChildWhichIsA("UIGridStyleLayout")
local absoluteContentSize = layout.AbsoluteContentSize
frame.CanvasSize = UDim2.new(0, 0, 0, absoluteContentSize.Y)
layout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function()
local absoluteContentSize = layout.AbsoluteContentSize
frame.CanvasSize = UDim2.new(0, 0, 0, absoluteContentSize.Y)
end)
Well but the my UI is for like if there is no player in the team, make it visible = false, but if player want to see hidden (visible = false) team, they can.