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

This doesn't seem to work anymore. I was tested it and it was working now It is not. Help?

Asked by 5 years ago
local fullsound = workspace.Sound.FullSiteLockdownSound
local bool = true
local bool2 = true
local clearance = {
    ["[SCP] Card-L5"] = true,
    ["[SCP] Card-L4"] = true,
    ["[SCP] Card-L3"] = false,
    ["[SCP] Card-L2"] = false,
    ["[SCP] Maksur"] = false,
    ["[SCP] Card-L1"] = false,
    ["[SCP] Card-Omni"] = true, 
    ["[SCP] RS Card"] = false,
    ["[SCP] O5-2 Access Card"] = true
}
script.Parent.Parent.FullSiteLockdown.touched:connect(function(touch)
    if touch.Name == "Handle" and clearance[touch.Parent.Name] and bool then
        if workspace.Sound.FullSiteLockdownSound.IsPlaying == false then
            workspace.Sound.FullSiteLockdownSound.Volume = "1"
            fullsound:Play()
            wait(7)
            workspace.Sound.FullSiteLockdownSound.Playing = true
            workspace.Sound.FullSiteLockdownSound.Volume = "0"
        else
            wait(7)
            workspace.Sound.FullSiteLockdownSound.Playing = false
            workspace.Sound.FullSiteLockdownSound.Volume = "1"
        end
end
end)


0
Did you make any script changes or Instance changes? DeceptiveCaster 3761 — 5y
0
May be something to do with ROBLOX studio, it works fine with a restart tictac67 96 — 5y
0
mk DeceptiveCaster 3761 — 5y
0
Update. It only works once it turns out. Any ideas? tictac67 96 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
local fullsound = workspace.Sound.FullSiteLockdownSound
local bool = true
local bool2 = true
local clearance = {
    ["[SCP] Card-L5"] = true,
    ["[SCP] Card-L4"] = true,
    ["[SCP] Card-L3"] = false,
    ["[SCP] Card-L2"] = false,
    ["[SCP] Maksur"] = false,
    ["[SCP] Card-L1"] = false,
    ["[SCP] Card-Omni"] = true, 
    ["[SCP] RS Card"] = false,
    ["[SCP] O5-2 Access Card"] = true
}
script.Parent.Parent.FullSiteLockdown.touched:connect(function(touch)
    if touch.Name == "Handle" and clearance[touch.Parent.Name] and bool then
        if workspace.Sound.FullSiteLockdownSound.IsPlaying == false then
            fullsound:Stop()
            wait(0.1)
            fullsound:Play()
            wait(8)
            fullsound:Stop()
            wait(1)
            workspace.Sound.FullSiteLockdownSound.Playing = true
            workspace.Sound.FullSiteLockdownSound.Volume = "0"
        if workspace.Sound.FullSiteLockdownSound.IsPlaying == true then
            wait(8)
            workspace.Sound.FullSiteLockdownSound.Playing = false
            workspace.Sound.FullSiteLockdownSound.Volume = "1"
        end

        end
end
end)


This seems to have fixed it. It wasn't stopping the sound for some reason

Ad

Answer this question