#Play an randomized sound
1 messages · Page 1 of 1 (latest)
math.random
very tuff
thank you for this invaluable and insightful contribution to this thread. mega tuff
Ikr, its all about contribution
idk how this works
** You are now Level 1! **
very tuff
then why scripting help exists if i can just search through google
we give you the keyword, you try your best to implement it afterwards we help with code, if there are errors
alr
math.random returns a random number from the range you give it
** You are now Level 11! **
scripting help is for when you're stuck and your researching isn't leading you anywhere. it's not for doing your research for you, or handing out free code 
nah, thats crazy tuff ong
I already know it doesn't handle out free code twin 👍
yes, a lot of people have learned this and its good, now we just need that second part to catch on 
i did it like this
local rng_sound = math.random(2,3)
if rng_sound == 3 then
sound:Play()
else
sound2:Play()
but it always play the first sound instead
wait i have found a simliar video brb
ok it works but it plays the second sound if i set math.random(2, #folder) or first sound if i do math.random(1, #folder)
wait im just being dumb
im not supposed to do it like that
bruh
ok i founded a solution