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

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

Asked by
Qawstar 32
6 years ago
Edited 6 years ago

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

Log in to vote
1
Answered by
arshad145 392 Moderation Voter
6 years ago
Edited 6 years ago

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!

Ad

Answer this question