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 your SoundId you want to be played
- player.PlayerGui.Sound:Stop() -- Stops any sound playing
- player.PlayerGui.Sound.SoundId = "" -- Copy the SoundId from the top
- player.PlayerGui.Sound:Play() -- Plays the SoundId
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment