Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do i get this sound to Destroy?

Asked by
sad_eyez 162
8 years ago

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

Log in to vote
0
Answered by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
8 years ago

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!

0
hey guys i finally figured it out after several freaking methods, but thank you so much for the help sad_eyez 162 — 8y
Ad

Answer this question