Okay so I have a intro for my game, and I want it to play one song randomly picked out of say 3
and I need help.
The first script is like this
1 | game.Workspace.introsound.Sound:Play() |
any helpers?
1 | soundList = { |
2 | game.Workspace.IntroSound 1 , |
3 | game.Workspace.IntroSound 2 , |
4 | game.Workspace.IntroSound 3 |
5 | } |
6 |
7 | game.Players.PlayerAdded:connect( function (plr) |
8 | soundList [ math.random( 1 ,#soundList) ] :Play() |
9 | end ) |
Try this.
01 | for i = 1 , 3 do |
02 |
03 | if i = = 1 then |
04 | game.Workspace.introsound.Sound:Play() |
05 |
06 | if i = = 2 then |
07 | game.Workspace.introsound 2. Sound:Play() |
08 |
09 | if i = = 3 then |
10 | game.Workspace.introsound 3. Sound:Play() |
11 |
12 | end |
13 | end |
14 | end |
15 | end |