what i am trying to say that theres a zombie and when i kill it or when it dies it plays a sound from a list of sounds in the script like this
{ID,ID,ID,ID}--When Zombie Dies Plays one of the random sound id's
this plays a random song id whenever a zombie dies..
math.randomseed(tick()) -- makes sure when you constantly replay the game, their will be a different sound local Zombie = -- your zombie's head... if Zombie == nil then local a = -- Song ID local b = -- Song ID local c = -- Song ID local d = -- Song ID local e = -- Song ID local ZombieVoice = Instance.new("Sound", Zombie) ZombieVoice.SoundId = math.random(a,b,c,d,e) end
I hope this worked, thank you if you accept answer
math.random
Perhaps, putting the variables [of sounds] on a table. In which, you can use that math.random with respect to the table you just implemented.