Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do i get this sound to Destroy?

I have tried a lot it was working fine without the if statement, and I though it would help if I added an if statement, I am using a Click Detector in a part because I am making an Entrance for a wwe arena, and the script works fine in studio, But when I play the actual game the Sound doesn't stop and delete. the script works perfect in studio exactly like it is, but it just won't delete the Sound for some reason when i'm in a normal game.

Lights = game.Lighting
Pyro = game.Workspace.Entrance.Pyro.Fire
Pyro2 = game.Workspace.Entrance.Pyro2.Fire
Pyro3 = game.Workspace.Entrance.Pyro3.Fire
Titan = game.Workspace.Entrance.Titantron.Screen.Decal
S1 = game.Workspace.Entrance.Screen1.Screen.Decal
S2 = game.Workspace.Entrance.Screen2.Screen.Decal

script.Parent.MouseClick:connect(function()
	local M = Titan.Sound
		M:Stop()
		M:Destroy()
		Titan.Texture = "rbxassetid://0"
		S1.Texture = "rbxassetid://0"
		S2.Texture = "rbxassetid://0"
		Lights.Brightness = 1
		Pyro.Enabled = false
		Pyro2.Enabled = false
		Pyro3.Enabled = false
		Lights.Ambient = Color3.new(1, 1, 1)
	end
end)

1 answer

✓ Accepted answer

Last time I checked, IsPlaying wasn't fully functional. An alternative to using that, is first to find the script that plays it, and have some sort of global variable to know if you played it or not. Hope I helped!

1 comment

0

hey guys i finally figured it out after several freaking methods, but thank you so much for the help

This discussion is preserved as it was. New answers, comments, and votes are closed.