Cronoss Posted February 14, 2022 Posted February 14, 2022 Basically I wanted to create an script that could make possible choose a random song from the table "songs". The problem is that the math.random always choose the same song, I don't know what it's happening; (client-side) --------------Table------------------------- local songs = {"a.mp3", "b.mp3", "c.mp3"} ---------------This part chooses randomly the song play = songs[math.random(#songs)] song = playSound(play, true)
Scripting Moderators thisdp Posted February 14, 2022 Scripting Moderators Posted February 14, 2022 maybe try to change the randomseed by math.randomseed
Cronoss Posted February 14, 2022 Author Posted February 14, 2022 I didn't change it but I added tickcount and it worked, thank you anyway
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now