I'm making this tip box where you click the box and a GUI appears to select the type of tip. I've done that part (it works). But when I scripted Marketplace it doesn't work in Server but does in Studio. I'm confused. And it's in a LocalScript if it helps to figuring this out.
local id1 = 342011634 local id2 = 342011882 --Developer Product IDs local id3 = 342023684 script.Parent.smol.MouseButton1Click:Connect(function() game.MarketplaceService:PromptProductPurchase(script.Parent.Parent.Parent, id1) end) script.Parent.grande.MouseButton1Click:Connect(function() game.MarketplaceService:PromptProductPurchase(script.Parent.Parent.Parent, id2) end) script.Parent.venti.MouseButton1Click:Connect(function() game.MarketplaceService:PromptProductPurchase(script.Parent.Parent.Parent, id3) end)
Make the scripts localscript.
local Player = game:GetService("Players").LocalPlayer local id1 = 342011634 local id2 = 342011882 local id3 = 342023684 script.Parent.smol.MouseButton1Click:Connect(function() game.MarketplaceService:PromptProductPurchase(Player.UserId, id1) end) script.Parent.grande.MouseButton1Click:Connect(function() game.MarketplaceService:PromptProductPurchase(Player.UserId, id2) end) script.Parent.venti.MouseButton1Click:Connect(function() game.MarketplaceService:PromptProductPurchase(Player.UserId, id3) end)