i’ve got a function right here, but when i call it, it prints, but it will just never play the sounds (the sounds are children of the script, they can be played in studio, and everything is set up correctly)
(please note that the room_generated variable (a boolean) is defined elsewhere, and since i’m using task.spawn when i call this function, it works as it should.)
function play_sounds()
local gen_sfx = script:WaitForChild("generation")
local gen_finished = script:WaitForChild("finish")
while not room_generated do
gen_sfx:Play()
print(`{gen_sfx} should be playing...`)
task.wait(0.1)
end
gen_sfx:Stop()
gen_finished:Play()
print(`{gen_finished} should play right now...`)
end
This could be an issue with the sounds not being loaded. Try printing whether or not they are loaded beforehand. You could also try moving them to somewhere link SoundService just in case and set the Playing property to true instead of using :Play().
Hmmm, Well have you checked the ids themselves and tested them. Make sure they are working for you in preview in studio first, secondly check the volume. If all of those functions are good…
Also try putting a space in between each play and stop