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)
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!