Hi, im both new to the devforum and scripting, I somewhat know the basics though,
I wanted the game to play a random lobby music when the player joins, from the selection of sound parts from soundservice
I dont know how to do this since im having to play around with these random things
I tried using a script from a previous thread but it seems not to work
i tried it again but with two sounds and make the chance 50% but when i test it on studio, nothing plays
does anyone know what im doing wrong, and how to fix it? I just want to know if im doing it correctly
(PS: The script is also located in SoundService)
if rand:NextNumber() <= 0.5 then
print('ITS TRUE')
script.Parent.Sound1:Play()
else
script.Parent.Sound2:Play()
end```
i tried my best to understand what it does so i tried making this
nothing is still working, i have no idea what im doing
local WaitNum = Random.new():NextInteger(1, 2) -- Gets a new integer between 60 and 120 which we'll use for the wait call
if WaitNum == 1 then
script.Parent.Sound1:Play()
print("ITS TRUE")
else
print("ITS FALSE")
end ```