I would like OpenSound1 to play locally (currently it is playing globally all over the map). I have been trying to figure this out myself but I just keep breaking it :( Line 37 is when the sound plays. I appreciate the help so much! Thank you in advance!
print("Advanced SpecialDoor Script loaded")
permission = { "Fire Dorm" }
Door = script.Parent.Parent.PersonDoor
DoorMesh = script.Parent.Parent.PersonDoor.Mesh
Sensor = script.Parent
function checkOkToLetIn(name)
for i = 1,#permission do
if (string.upper(name) == string.upper(permission[i])) then return true end
end
return false
end
function onTouched(hit)
print("Sensor Hit")
local human = hit.Parent:findFirstChild("Humanoid")
if (human ~= nil ) then
--
print("Human touched door")
if (checkOkToLetIn(human.Parent.Name)) then
print("Human passed test")
Wait(0.001)
script.Parent.Parent.Dot1.Transparency = 0
wait(0.4)
script.Parent.Parent.Dot2.Transparency = 0
wait(0.4)
script.Parent.Parent.Dot3.Transparency = 0
wait(0.4)
script.Parent.Parent.Open.Transparency = 0
script.Parent.Parent.Close.Transparency = 1
wait(0.2)
script.Parent.Parent.OpenSound1:Play()
wait(0.1)
script.Parent.Parent.OpenSound2:Play()
script.Parent.Parent.HandlePart3.Transparency = 0
script.Parent.Parent.HandlePart4.Transparency = 0
script.Parent.Parent.HandlePart.Transparency = 1
script.Parent.Parent.HandlePart2.Transparency = 1
script.Parent.Parent.Acess.Mesh.Scale = Vector3.new(0.9, 0.5, 1.01)
Door.Transparency = 0
wait(0.02)
Door.CanCollide = false
script.Parent.Parent.Dot1.Transparency = 1
script.Parent.Parent.Dot2.Transparency = 1
script.Parent.Parent.Dot3.Transparency = 1
wait(3)
script.Parent.Parent.Open.Transparency = 1
script.Parent.Parent.Close.Transparency = 0
script.Parent.Parent.HandlePart3.Transparency = 1
script.Parent.Parent.HandlePart4.Transparency = 1
script.Parent.Parent.HandlePart.Transparency = 0
script.Parent.Parent.HandlePart2.Transparency = 0
script.Parent.Parent.OpenSound2:Play()
wait(0.1)
script.Parent.Parent.Acess.Mesh.Scale = Vector3.new(0.01, 0.01, 0.01)
Door.CanCollide = true
Door.Transparency = 0
end
end
end
connection = Sensor.Touched:connect(onTouched)

2 comments
Place the sound inside the player. For instance the PlayerGui. Everything inside the player is local.
I think he meant, for example, you here the sound if you are this close. As you get farther away, it grows quieter. You know, like real life