How could I randomise the SortOrder of UIGridLayout?

Title says it all, would it be possible to randomise the SortOrder of the UIGridLayout via a script?

Thanks for any help in advance.

local sortOrders = Enum.SortOrder:GetEnumItems()
local random = sortOrders[math.random(#sortOrders)]
uiGridLayout.SortOrder = random

Tried it, does nothing whatsoever.

it also warns that SortOrder.Custom is deprecated

You could just randomize each of the frames layoutorder like this:

local grid = script.Parent.Frame.UIGridLayout
grid.SortOrder = Enum.SortOrder.LayoutOrder

function randomizeOrder()
	for i, v in pairs(grid.Parent:GetChildren()) do
		if v:IsA("Frame") then
			v.LayoutOrder = math.random(1, #grid.Parent:GetChildren())
		end
	end
end

script.Parent.TextButton.MouseButton1Click:Connect(randomizeOrder) --Example usage