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

How i make music player like next song button, back song button, loop button or stop button?

Can anyone help me to make script ?

1 answer

✓ Accepted answer

Hi ceookmega312!

Unfortantely, I can not give you the whole script to doing this, as this is not a request site. But I can give you some help that might help you out:

Next Song Button/Back Button:

local songs = {001, 002, 003} --id songs
script.Parent.MouseButton1Click:Connect(function()
      local sound = script.Parent.Sound
      sound:Stop()
      sound.SoundId == "rbxassetid://"..songs[songs.Index + 1]
      sound:Play()
end

Make sure that you have the id's set and that there is "Sound". I have not physically tested this, I am doing this straight from my head, so I do not know if this will work. This script should work for the next song, but I am not sure. For going back, we can change the index by doing songs.Index - 1.

Loop: There is a simple :Loop() function

Stop Button: There is a simple :Stop() function

Hope I helped, LennyPlayzYT

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