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

A music player script doesn't work for some reason..?

Hello!

I've been trying to make a script which would play MULTIPLE songs, and also show the song (aka "Currently Playing") so the player could see which song is currently playing. Which I've seen in almost every cafe, hotel and other group games.

I've tried to fix this by using ROBLOX Wiki, YouTube videos and etc.. But nothing has worked. So, if you have any idea how to fix this problem/script! Please leave an answer. :)

And also, here's the script!:


local NowPlaying = script.Parent.Parent.TextLabel.Text
local SoundID = script.Parent.Parent.SongPlayer.SoundId

print("The music player has loaded!")

wait(1)

SoundID = "rbxassetid://1051512943"
NowPlaying = "Running in the OOFs"
script.Parent.Parent.SongPlayer:Play()
script.Parent.Parent.SongPlayer.Ended:wait()

THANK YOU!

1 answer

✓ Accepted answer

Hello,

local NowPlaying = script.Parent.Parent.TextLabel
local SoundPlayer = script.Parent.Parent.SongPlayer
print("The music player has loaded!")
wait(1)
SoundPlayer.SoundId = "rbxassetid://1051512943"
NowPlaying.Text = "Running in the OOFs"
SongPlayer:Play()
SongPlayer.Ended:Wait() -- Use Wait() instead of wait()

Thank you for reading.

P.S : Please up vote if it helped you!

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