LightRaid
|
  |
| Joined: 08 Oct 2012 |
| Total Posts: 4414 |
|
|
| 25 Jul 2015 01:02 PM |
function removePlate() p = game.Workspace.DissapearingPlates.Plates:GetChildren() ranNum = math.random(1, #p) ranNum2 = ranNum while ranNum == ranNum2 do ranNum2 = math.random(1, #p) wait() end plateChosen = p(ranNum) plateChosen = p(ranNum2) for i = 0, 1, 0.05 do plateChosen.Transparency = i plateChosen2.Transparency = i wait() end plateChosen:Destroy() plateChosen2:Destroy() end
This particular function is for my Disappearing Plates mini-game, it's supposed to make each plate disappear randomly, one by one... but it won't work :-( |
|
|
| Report Abuse |
|
|
LightRaid
|
  |
| Joined: 08 Oct 2012 |
| Total Posts: 4414 |
|
| |
|
LightRaid
|
  |
| Joined: 08 Oct 2012 |
| Total Posts: 4414 |
|
| |
|
LightRaid
|
  |
| Joined: 08 Oct 2012 |
| Total Posts: 4414 |
|
| |
|
LightRaid
|
  |
| Joined: 08 Oct 2012 |
| Total Posts: 4414 |
|
| |
|
XYuy
|
  |
| Joined: 24 Dec 2010 |
| Total Posts: 5628 |
|
|
| 25 Jul 2015 02:51 PM |
| You need to make sure that the math.random does not choose the same number. |
|
|
| Report Abuse |
|
|