Syntax Error:Expected ')' (to close '(' at line 6),got <eof> Anyone know how to fix this?

local MarketPlaceservice = game:GetService("MarketplaceService")

local DevproductId = script.Parent["DevId 1"].value

["PurchaseButton 1"].MouseButtonClick:connect(function()
MarketPlaceservice:PromptProductPurchase(player,DevproductId)

end```

I've tried to solve it but nothing seems wrong. The error is underlined at the end where it says DevproductId. Please help im trying to make a donation gui

You started a parenthesis so you have to close it

blahblahblah:Connect(function()

end)
3 Likes

Add a ‘)’ after the end. It’s exactly what the error states.

thx but now I have a new problem
players.superbleeblee882.PlayerGui.Donate gui.Frame.Purchase button 1.LocalScript:6: attempt to index number with ‘PurchaseButton 1’

1 Like

This by itself isnt referencing anything
Is the purchase button in the script?
You would have to do script.Parent[“PurchaseButton 1”] in that case

Tried that but now it says it isnt a valid member

ah nvm I figured it out thank you!