im2awsm
|
  |
| Joined: 25 Aug 2010 |
| Total Posts: 2295 |
|
|
| 20 Oct 2012 07:36 PM |
| How would i go about making a block that when i click, it gives me a random gear from lighting. Also, is there a way to set the chance of getting a gear? Thanks. |
|
|
| Report Abuse |
|
|
|
| 20 Oct 2012 07:48 PM |
Use the way a dance floor color works to make it pick something random :D Use the colors to change the chance. |
|
|
| Report Abuse |
|
|
im2awsm
|
  |
| Joined: 25 Aug 2010 |
| Total Posts: 2295 |
|
| |
|
TaaRt
|
  |
| Joined: 26 Apr 2009 |
| Total Posts: 5039 |
|
|
| 25 Oct 2012 04:48 AM |
| You are requesting a script, this forum isn't meant to do so. |
|
|
| Report Abuse |
|
|
TaaRt
|
  |
| Joined: 26 Apr 2009 |
| Total Posts: 5039 |
|
|
| 25 Oct 2012 04:49 AM |
| To increase chance however, you could simply but multiple of the same gear in Lighting, easiest way there is. |
|
|
| Report Abuse |
|
|
TaaRt
|
  |
| Joined: 26 Apr 2009 |
| Total Posts: 5039 |
|
| |
|
awas3
|
  |
| Joined: 24 Oct 2010 |
| Total Posts: 2854 |
|
|
| 25 Oct 2012 05:49 AM |
gears = {"GEARNAME";"GEARNAME";"GEARNAME"} -- Add more if you want.
script.Parent.ClickDetector.MouseClick:connect(function(plr) g = game.Players:findFirstChild(plr.Name) if g then f = gears[math.random(1, #gears) n = game.Lighting:findFirstChild(f) if n then n:Clone.Parent = plr.Backpack end end end)
Havent tested, just try it.
~A3~ |
|
|
| Report Abuse |
|
|
|
| 25 Oct 2012 05:53 AM |
script.Parent.MouseClick:connect(function(p) gearc = game.Lighting.Gear:GetChildren() gear = gearc[math.random(1, #gearc)] gear:clone().Parent = p.Backpack end)
Just put all the gear in a model called "Gear" in the Lighting. |
|
|
| Report Abuse |
|
|
im2awsm
|
  |
| Joined: 25 Aug 2010 |
| Total Posts: 2295 |
|
|
| 25 Oct 2012 06:17 AM |
| Thanks SourceLift! I just had to edit 2 things to make it worse though. Thanks. |
|
|
| Report Abuse |
|
|
im2awsm
|
  |
| Joined: 25 Aug 2010 |
| Total Posts: 2295 |
|
|
| 25 Oct 2012 06:19 AM |
| my brain isnt working. Thanks SOURCELEAK.. imma fail |
|
|
| Report Abuse |
|
|
|
| 25 Oct 2012 06:40 AM |
| You mean like a Random gear giver? |
|
|
| Report Abuse |
|
|