I have a audio on 3 different bricks (B1, B2, B3) I want that audio to play randomly on each brick.. How do i do that?
Here try this, it should work o.o
01 | B 1 = game.Workspace.B 1 |
02 | B 2 = game.Workspace.B 2 |
03 | B 3 = game.Workspace.B 3 |
04 | --I put it into a table |
05 | Table 1 = { B 1 ,B 2 ,B 3 } |
06 | --Random function |
07 | Num = math.random( 1 ,#Table 1 ) |
08 | --Choose item |
09 | ITEM = Table 1 [ Num ] |
10 | --Play Audio |
11 | ITEM.Sound:Play() |
12 |
13 | --or :Stop() |
Closed as Not Constructive by Shawnyg
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?