I'm trying to make a script where you buy the developer product then the game changes a sound id in the text box the character has. I can't seem to get it to work
script.Parent.MouseButton1Click:Connect(function()
local mpService = game:getService("MarketplaceService")
mpService:PromptProductPurchase(game.Players.LocalPlayer, 49078483)
wait(2)
game.Workspace.Songid.Sound.SoundId = game.Players.LocalPlayer.StarterGui.PaytoPlay.TextBox.Text
wait(2)
game.Workspace.Songid.Sound.Playing = true
end)
Is there a way to do this all by local script?
