ModuleScript not returning objects created inside it

Making a program that creates a folder in a ModuleScript, and then stores this folder’s location for reference in an ObjectValue.

local f = mainFrame.createClone(buttons,forSale)
print("f is a "..typeof(f))
---- above are local variables
cloney.Value = f

It will print that ‘f’ is an instance, but when I try to store it in “cloney,” the ObjectValue, this happens:
https://gyazo.com/a728f94bad2031c047febaaf7fea2076

Here’s the ModuleScript:

tycoon = {}

---insert other functions that work fine here

function tycoon.createClone(buttons,items)
	local folder = Instance.new("Folder",game.ServerStorage.playerBases)
	local newName = false
	while newName == false do
		local name = random_string(6)
		if valid(game.ServerStorage.playerBases,name) ~= true then
			newName = true
			folder.Name = name
		end
	end
	return folder
end

return tycoon

You didn’t show the definition of cloney, the error states you’re trying to index a function for the key Value.

local function cloney() end
cloney.Value = 123
-- Workspace.Script:2: attempt to index function with 'Value'
local cloney = Instance.new("ObjectValue")

that is the definition of cloney in my script.