SHOW:
|
|
- or go back to the newest paste.
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 |
4 | + | if player.PlayerGui.Sound.SoundId ~= "" then -- Insert sound id here |
5 | player.PlayerGui.Sound:Stop() -- Stops any sound playing | |
6 | - | player.PlayerGui.Sound.SoundId = "" -- Copy the SoundId from the top |
6 | + | player.PlayerGui.Sound.SoundId = "" -- edit this sound id here also |
7 | player.PlayerGui.Sound:Play() -- Plays the SoundId | |
8 | end | |
9 | end | |
10 | end) |