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

How do I add something before an id in a sound?

I'm making a developer product and I can't get something before the id of the sound . My script is:

script.Parent.MouseButton1Click:Connect(function()
	
	
	local mpService = game:getService("MarketplaceService")
    mpService:PromptProductPurchase(game.Players.LocalPlayer, 49078483)
	game.Workspace.Songid.Sound.SoundId = game.Players.LocalPlayer.PlayerGui.PaytoPlay.TextBox.Text 
    


end)

However I need to add this before the textbox text:

rbxassetid://

Is there any way to put this before the sound id the player puts in? Any clues would be appreciated!

1 answer

✓ Accepted answer

You will need to do something called concatenate here is how you do it

"rbxassetid://".. game.Players.LocalPlayer.PlayerGui.PaytoPlay.TextBox.Text

Hope that helped

2 comments

0

This completely fixed my problem thanks!

0

No problems :D

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