Here is my script. it gives me an error message: 18:43:02.550 - Failed to load sound rbxassetid://0: Unable to download sound data (x2)
1 | button = script.Parent.Parent.TextButton |
2 | button.MouseButton 1 Click:Connect( function () |
3 | stringID = script.Parent |
4 | game.ReplicatedStorage.newSong.Value = tonumber (stringID.Text) |
5 | game.Workspace.Sound.SoundId = "rbxassetid://" ..game.ReplicatedStorage.newSong.Value |
6 | end ) |
1 | script.Parent.Parent.TextButton.MouseButton 1 Click:Connect( function () |
2 | local stringID = script.Parent.Text |
3 | game.ReplicatedStorage.newSong.Value = tostring ( tonumber (stringID)) |
4 | game.Workspace.Sound.SoundId = "rbxassetid://" ..game.ReplicatedStorage.newSong.Value |
5 | game.Workspace.Sound:Play() |
6 | end ) |
That should work. Make sure "newSong" is a stringValue