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

I've made a gui with mute button and thing but umm i doesn't play the music?

Asked by 4 years ago

I've made a gui with a mute button with songs and stuff but when I make the song script it doesn't play. Please help. Here is my script I am using currently also its a LOCAL SCRIPT.

game.ReplicatedStorage.Events.UpdateSong.OnClientEvent:connect(function(Song) script.Parent.Text = "2682665686,1051512943,1573711986,214902446,398159550,131261480,169360242 "..Song end)

1 answer

Log in to vote
0
Answered by
noammao 294 Moderation Voter
4 years ago
Edited 4 years ago

I'm not really sure about how the structure of your codes and objects work but in order for a song to play you have to first set the SoundId in a sound instance and then use the Play() function. You don't have to use the play function. If you have checked Playing in the properties of the sound then it will play automatically.

Also, if you are sending a string that is the song id through the RemoteEvent then you should use it like so:

game.ReplicatedStorage.Events.UpdateSong.OnClientEvent:connect(function(Song)
    print(Song)
    Sound.SongId = Song
    Sound:Play()
end)

There are probably other ways to use it but without trying too much this is what I came up with.

0
Thank you! Tortoise_Dev 0 — 4y
0
Would be happy if you accepted the answer then :P noammao 294 — 4y
Ad

Answer this question