Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Random sound function completes successfully, but does not play sounds?

Asked by
MexheCo 46
5 years ago
Edited 5 years ago

My script works fine (the name of the sound prints out in the console) but the sound doesn't play. Any idea what could be causing this?

function MapChooser() math.random(1, 6) local sounds = game.SoundService.RandomSounds:GetChildren() local chosen = sounds[math.random(1,#sounds)] print(chosen.Name) chosen:Play() end while true do wait(6) MapChooser() end

0
Had to post it like this because markup is garbage MexheCo 46 — 5y

Answer this question