Thr3star
|
  |
| Joined: 28 Mar 2013 |
| Total Posts: 10 |
|
|
| 20 Dec 2016 03:00 AM |
I recently scripted a crate unboxing system in a game i'm going to be releasing soon but I can't get the crate to randomize which item you get. I tried using math.random but for some reason it doesn't let me use it inside a function. I'm using the clickdetector function btw.
|
|
|
| Report Abuse |
|
|
| |
|
| |
|
Thr3star
|
  |
| Joined: 28 Mar 2013 |
| Total Posts: 10 |
|
|
| 20 Dec 2016 04:35 AM |
I tried that before but it didn't do anything. Turns out all i had to do was define the variable before the function, copy and paste it inside the unboxing script that i made then I had to define what would happen if it landed on 1, 2, 3, 4 and 5.
|
|
|
| Report Abuse |
|
|