XxxLloyd061302xxX

Music Script

Jul 11th, 2018
7,906
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1. script.Parent.Touched:connect(function(hit)
  2.     if hit.Parent:FindFirstChild("Humanoid") then
  3.         local player = game.Players:FindFirstChild(hit.Parent.Name)
  4.         if player.PlayerGui.Sound.SoundId ~= "" then -- Insert your SoundId you want to be played
  5.             player.PlayerGui.Sound:Stop() -- Stops any sound playing
  6.             player.PlayerGui.Sound.SoundId = "" -- Copy the SoundId from the top
  7.             player.PlayerGui.Sound:Play() -- Plays the SoundId
  8.         end
  9.     end
  10. end)
Advertisement
Add Comment
Please, Sign In to add comment