Can anyone tell me whats wrong with this script?

Hello I’m trying to figure out how this donation board works. I have been working on a game for my friends birthday to help him get his dream item and needed to add a donation board. It had an error at the end according to output with the last two lines. I don’t know what to do please help.

local module = {}	
module.Products = {
	
	{
		ProductPrice = 5, --The price from the Developer Product.
		ProductId = 1104627743 -- The ID from the Developer Product.	
	},
	{
		ProductPrice = 10, --The price from the Developer Product.
		ProductId = 1104628219 -- The ID from the Developer Product.	
	},
	{
		ProductPrice = 50, --The price from the Developer Product.
		ProductId = 1104628503 -- The ID from the Developer Product.	
	},
	{
		ProductPrice = 100, --The price from the Developer Product.
		ProductId = 1104628569 -- The ID from the Developer Product.	
	},
	{
		ProductPrice = 500, --The price from the Developer Product.
		ProductId = 1104628759 -- The ID from the Developer Product.	
	},
	{
		ProductPrice = 1000, --The price from the Developer Product.
		ProductId = 1104628963 -- The ID from the Developer Product.
	},
	{
		ProductPrice = 2000, --The price from the Developer Product.
		ProductId = 1104629074 -- The ID from the Developer Product.
	},
	{
		ProductPrice = 5000, --The price from the Developer Product.
		ProductId = 1104629168 -- The ID from the Developer Product.
	},
	{
		ProductPrice = 10000, --The price from the Developer Product.
		ProductId = 1104629353 -- The ID from the Developer Product.
		
	}
	
	module.AbortCustomPurchases = true
	
	return module

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

1 Like

Maybe wrong ID of the product. Maybe is the script need to be writed again.

Can you show us the output error so we can see the problem more clearly? Thanks :slight_smile:

1 Like

Do the developer products even exist?

When I try looking for the items you put the ID for I don’t see things that look like items you own. For the 10 robux donation I see a shirt named " NEW!:stuck_out_tongue_closed_eyes::white_check_mark: DESIGNER :white_check_mark::stuck_out_tongue_closed_eyes:-:fire: Orange W/ Black Hair :fire:" which costs 5 robux. Do you own these items?

When programming, every bracket (([{) needs a corresponding }]) or else it’ll complain. It’s why in the example

RBXScriptSignal:Connect(function() end)

You use end) rather than end; you’re just closing the ( you started a few characters back.

In your script, you started a table under module.Products, but never closed the { after you were done. Hence why Studio indented your code awkwardly. A good table should look like:

{ -- open
    { -- open
        -- ...
    } -- close
} -- close

Quick and dirty solution? Add } before module.AbortCustomPurchases = true

its devproducts not items and no i don’t own the item
" NEW!:stuck_out_tongue_closed_eyes::white_check_mark: DESIGNER :white_check_mark::stuck_out_tongue_closed_eyes:-:fire: Orange W/ Black Hair :fire:"

wait so

} module.AbortCustomPurchases = true

Okay nevermine I realized from looking at the original script it was wrong and think i got it working thanks!