Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why won't the Songid change to the text?

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?

1 answer

✓ Accepted answer

you can try do local script and make a event, whenever player buys it, and change the textbox's text, it might fires server.

This discussion is preserved as it was. New answers, comments, and votes are closed.