Hi! For some sound design I’m doing, I need to save the initial volume of all sound effects I’m going to use for use in tweens. I’m trying to achieve something like this, but with scripting instead of doing it manually:
I came up with this basic script which I expected to work first try…
local soundVolume0 = {}
for _,v in pairs(Engine:GetChildren()) do
if v:IsA("Sound") then
table.insert(soundVolume0, {[v.Name] = v.Volume;})
end
end
print(soundVolume0)
In the end though, I noticed that each sound I inserted is a child of a number, which means I cannot just look their names up when I need that data about them. e.g. soundVolume0["Idle"]
Any help?