Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 4 years ago

Can anyone help me to make script ?

Closed as Not Constructive by youtubemasterWOW

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
1
Answered by 4 years ago

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

Ad