Jake0128
|
  |
| Joined: 09 Aug 2013 |
| Total Posts: 1631 |
|
|
| 25 Oct 2013 07:40 PM |
It gets caught in a strange loop where it just infinitely keeps generating numbers and not doing anything with them.... this is inside a coroutine : / ideas?
xgen = 0 ygen = 0 zgen = 0
for i = 1, 10 do factor = math.random(1, 1000) print(factor) if factor <= 600 then ore2 = game.Lighting.dirt:clone() elseif factor >= 601 and factor <= 733 then ore2 = game.Lighting.iron:clone() elseif factor >= 734 and factor <= 870 then ore2 = game.Lighting.lead:clone() elseif factor >=871 and factor <= 935 then ore2 = game.Lighting.copper:clone() else ore2 = game.Lighting.silver:clone() end ore2.CFrame = CFrame.new(xgen, ygen, zgen) xgen = xgen + 5 wait() end |
|
|
| Report Abuse |
|
|
Jake0128
|
  |
| Joined: 09 Aug 2013 |
| Total Posts: 1631 |
|
|
| 25 Oct 2013 07:53 PM |
| bump, this should be so simple but I dont get it x_x |
|
|
| Report Abuse |
|
|
|
| 25 Oct 2013 07:58 PM |
The parent of an object cloned with the Clone method is set to nil by default.
You need to manually set the parent of the cloned instance. |
|
|
| Report Abuse |
|
|
Jake0128
|
  |
| Joined: 09 Aug 2013 |
| Total Posts: 1631 |
|
| |
|