Error "Module code did not return exactly one value"

I’ve tried searching it up and haven’t found an answer that works. If anyone knows the problem, please tell me!!! Thanks!

Script:

local module = {}

local ms = game:GetService("MarketplaceService")
local Settings = require(script.Parent.SETTINGS)
local buy = script.Parent.Buy.SurfaceGui.Frame.ScrollingFrame.Buy

module.Products = {unpack(Settings)}

local info = ms:GetProductInfo(module.Products[1], Enum.InfoType.Product)
buy.Text = string.gsub(buy.Text, "_", tostring(info.PriceInRobux))

for i, id in ipairs(module.Products) do
	if i == 1 then return end

	local info = ms:GetProductInfo(id, Enum.InfoType.Product)
	local dupe = buy:Clone()	
	dupe.Text = string.gsub(dupe.Text, "_", tostring(info.PriceInRobux))
end

return module
1 Like

Found it. I did an “if then return end” which returned twice

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.