If I have a ModuleScript for playing audio and i have the first argument be the sound instance, is there a way to have it autocomplete to show all the audio thats in my sounds folder?
I’ve heard of type checking and I’m not sure if that’s what I would need for this, and it also seems that for type checking (atleast from what i’ve seen anyway) that in my case I would have to type out all the audios names one by one which I don’t think would be ideal as there are a lot of audios and their names could change or have more added.
local SoundModule = {}
function SoundModule.playSound(soundToPlay: Sound, parent: Instance)
task.delay(nil, function()
local sound = soundToPlay:Clone()
sound.Parent = parent
sound:Play()
sound.Ended:Wait()
sound:Destroy()
end)
end
return SoundModule