There are three sounds L1, L2, and L3. It chooses which one to play with l[math.random(1,3)]
However, I got an error: "L is not a valid member of Model
local randum = math.random(1,3) local sound = game.Players.Player1.PlayerGui.Options.Effects.Lose.L[randum] sound:play()
Perhaps this is not the proper way to do this. Any suggestions?
Hi! I saw your question on the Scripters forum (that is not the place where it should go by the way)
It is because L[randum] is trying to find just "randum" instead of "L(randum)". So you would have to do local sound = game.Players.Player1.PlayerGui.Options.Effects.Lose:findFirstChild("L"..randum)
.
If you have any questions, please comment!