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

How can I fix: Expected identifier when parsing expression, got ')' - Studio - SoundManager:42 ?

Asked by 3 years ago

local plr = game.Players.LocalPlayer

local soundRegions = workspace:WaitForChild("SoundRegions") soundRegions = soundRegions:GetChildren()

local soundManagment = {}

for _,region in pairs(soundRegions) do

local info = {}

local region3 = Region3.new(region.Position-(region.Size/2),region.Position+(region.Size/2))
region.Transparency = .5

info.Region = region3
info.Sound = script.SoundRegions:FindFirstChild(region.name).Sound

table.insert(soundManagment,info)

end

game:GetService("RunService").RenderStepped:Connect(function()

for _, soundInfo in pairs(soundManagment) do

    local region = soundInfo.Region
    local sound = soundInfo.Sound
    local parts = workspace:FindPartsInRegion3WithIgnoreList(region,plr.Character:GetDescendants())

    if #parts > 0 then

        if not sound.IsPlaying then

            sound:Play() 

        end

    else

        sound:Stop()

    end)
0
I am afraid the entire script isnt in the question. Anyways, you put a closing parethesis on where it is otherwise unnecessary. RAFA1608 543 — 3y
0
Therefore, it errored. RAFA1608 543 — 3y

Answer this question