I have a script that plays a sound when you touch a invisible block (its supposed to be played when the player touches an invisible barrier when falling off the map
local SoundID = 613031470
local Block = script.Parent
local Debounce = false
Game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=" .. SoundID)
wait(1/30)
Block.Touched:connect(function(Hit)
if Debounce == false then
Debounce = true
local Hum = Hit.Parent:findFirstChild("Humanoid")
if Hum then
local Sound = Instance.new("Sound", Workspace)
Sound.Volume = 1
Sound.SoundId = "http://www.roblox.com/asset/?id=" .. SoundID
Sound.Looped = false
Sound.Pitch = 1
Sound.Archivable = false
Sound:Play()
end
end
end)
And i cannot really figure i out how to make it play not in the workspace, but on the player who triggered the sound. (Basically make the player who fell off "Scream", not make the scream sound play for the whole server.) Im kinda new to scripting, so yeah...

1 comment
Put the invisible trigger inside of your camera in workspace when the game starts, that way only a client can trigger the scream.