Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Must be inside the Sound in StarterGui
- game.ReplicatedStorage.PlayMusic.OnClientEvent:Connect(function(sound) -- PlayMusic is the name of the RemoteEvent. Change it if you have a different name.
- if script.Parent.SoundId ~= sound then
- script.Parent:Stop()
- script.Parent.SoundId = sound
- script.Parent:Play()
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement