Hello! For some reason my code keeps displaying this while trying to get audio from soundservice. help appreciated (Im trying to make it so the audio can not be heared further away)
local ContentProvider=game:GetService("ContentProvider");
audios = game.SoundService.NPC.Citizen.Talks:GetChildren()
while wait() do
t = math.random(1,#audios)
audios[t]:Play()
task.wait(10)
audios[t]:Stop()
end
I know this is an old question but I just happened to come across it and thought I could help. The error is caused by the :GetChildren() method being called on an instance value. If you want to get all of the children of the SoundService.NPC.Citizen.Talks instance value, you can do it like this:
Hi there! This issue is still here. I have had a look at your code but there isnt anything there? that might just be on my end but I can not see anything.
local ContentProvider=game:GetService("ContentProvider");
local audiostable = game.SoundService.NPC.Citizen.Talks:GetChildren()
local audios = {}
for i, v in ipairs(audiostable) do
table.insert(audios, v)
end
while wait() do
t = math.random(1,#audios)
audios[t]:Play()
task.wait(10)
audios[t]:Stop()
end
Edit: I also donβt see his code so itβs probably not on your end.