In the image, you can see a syntax/runtime error at the top. the error isnt the variable with the table but i found if i delete the “local playSound = audioClips[currentClip]” then it goes away, but i do need that line to know which sound i have to play. I honestly have no clue and it might just be something in a new studio update. if you have any idea on how to fix this, please help
heres a version where you can copy and paste the script
local audioClips = {}
for _, v in pairs(script.Parent:GetChildren()) do
if v:IsA(“Sound”) then
table.insert(audioClips, v)
end
endlocal currentClip = 1
while true do
local playSound = audioClips[currentClip]
if playSound then
if not playSound.IsLoaded then
playSound.Loaded:Wait()
endplaySound:Play() while playSound.IsPlaying do wait(0.1) endelse
warn(“Clip not found!”)
wait(2)
endcurrentClip += 1
if currentClip > #audioClips then
currentClip = 1
end
end
idk why it appears like this
