-- Function to recursively search for a child of a given class

local function FindChildOfClassRecursive(instance, className)
	for _, child in pairs(instance:GetDescendants()) do
		if child:IsA(className) then
			return child
		end
	end
	return nil
end
