Every time I enter the test mode, a sound is played

The problem is this: Every time I try to join my game a noise plays.
I have tried playing around with the properties, but have had no success. Therefore I would like to ask here if someone can help me.

Here is a video of the problem:

Search for all Sound instances and find one that’s PlayOnRemove, or search all scripts and look for the Play() function.

Okay, I think I found the Script with the Play() function. It looks like this:
Screenshot (176)
What should I change to stop the Sound from playing?

Is that function being used immediately?

If so, just delete that function and all instances of it, it doesn’t seem to be doing much except causing annoyance.

If you notice other parts of the game being broken, add it back.

So there’s no way to remove that? Only Deleting that Function? I’m asking because I need that Sound.

Can you send the whole script?

Yeah Of Course I can:

local isOn = true

function off()
	isOn = false
	print 'Door opened'
   script.Parent.BrickColor = BrickColor.new("Bright red")
   script.Parent.Parent.a1.Transparency = 1
   script.Parent.Parent.a1.CanCollide = false
   script.Parent.Parent.a2.Transparency = 1
   script.Parent.Parent.a2.CanCollide = false
   script.Parent.Parent.a3.Transparency = 1
   script.Parent.Parent.a3.CanCollide = false
   script.Parent.Parent.a4.Transparency = 1
   script.Parent.Parent.a4.CanCollide = false
   script.Parent.Parent.b1.Transparency = 0.75
   script.Parent.Parent.b2.Transparency = 0
   script.Parent.Parent.c1.Transparency = 0.75
   script.Parent.Parent.c2.Transparency = 0
   script.Parent.Parent.Cudlajs.Material = Enum.Material.Neon
   script.Parent.Parent.Cudlajs.Transparency = 0
end

function on()
	isOn = true
	script.Parent.Sound:Play()
	script.Parent.Parent.Warn.BrickColor = BrickColor.new("Really red")
	script.Parent.Parent.Warn.Material = Enum.Material.Neon
	wait(2.0)
	script.Parent.Sound:Pause()
	script.Parent.Parent.Warn.BrickColor = BrickColor.new("Black")
	script.Parent.Parent.Warn.Material = Enum.Material.SmoothPlastic


	
	print 'Door closed'
   script.Parent.BrickColor = BrickColor.new("Bright green")
   script.Parent.Parent.a1.Transparency = 0.75
   script.Parent.Parent.a1.CanCollide = true
   script.Parent.Parent.a2.Transparency = 0.75
   script.Parent.Parent.a2.CanCollide = true
   script.Parent.Parent.a3.Transparency = 0
   script.Parent.Parent.a3.CanCollide = true
   script.Parent.Parent.a4.Transparency = 0
   script.Parent.Parent.a4.CanCollide = true
   script.Parent.Parent.b1.Transparency = 1
   script.Parent.Parent.b2.Transparency = 1
   script.Parent.Parent.c1.Transparency = 1
   script.Parent.Parent.c2.Transparency = 1
   script.Parent.Parent.Cudlajs.Material = Enum.Material.SmoothPlastic
   script.Parent.Parent.Cudlajs.Transparency = 0.35
end

function onClicked()
	
	if isOn == true then off() else on() end

end

script.Parent.ClickDetector.MouseClick:connect(onClicked)

on()

Just delete this line at the very end, that’s what’s causing the sound to play.

1 Like

Thank You so Much! You helped me a lot!

1 Like