Advertisement
XxxLloyd061302xxX

Local script

Jul 26th, 2018
12,023
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.33 KB | None | 0 0
  1. -- Must be inside the Sound in StarterGui
  2.  
  3. game.ReplicatedStorage.PlayMusic.OnClientEvent:Connect(function(sound) -- PlayMusic is the name of the RemoteEvent. Change it if you have a different name.
  4.     if script.Parent.SoundId ~= sound then
  5.         script.Parent:Stop()
  6.         script.Parent.SoundId = sound
  7.         script.Parent:Play()
  8.     end
  9. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement