Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- script.Parent.Touched:connect(function(hit)
- if hit.Parent:FindFirstChild("Humanoid") then
- local player = game.Players:FindFirstChild(hit.Parent.Name)
- if player.PlayerGui.Sound.SoundId ~= "" then -- Insert sound id here
- player.PlayerGui.Sound:Stop() -- Stops any sound playing
- player.PlayerGui.Sound.SoundId = "" -- edit this sound id here also
- player.PlayerGui.Sound:Play() -- Plays the SoundId
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement