|
| 05 Jan 2012 03:40 PM |
game.Lighting.Enemy:Clone().Parent = game.Workspace end
----------------------------------------------------------------------------------------------- Just making sure I got this right, I don't wanna spend time making a broken script.
Also, is it (random.math) 1, 2), random.math(1, 2)? I'm trying to think of how to make a chance script... and I forgot how to write it.
If you could get me a link about it, that would really help a lot.
:) |
|
|
| Report Abuse |
|
|
Fl0x
|
  |
| Joined: 06 Aug 2010 |
| Total Posts: 5169 |
|
|
| 05 Jan 2012 03:41 PM |
game.Lighting.Enemy:Clone().Parent = game.Workspace
Should be fine, just make sure Enemy exists.
Also, it's math.random(1,2) |
|
|
| Report Abuse |
|
|
|
| 05 Jan 2012 03:45 PM |
Oh ok, thanks. Still the only thing I need to know now is, how do I make like find what random number it is. That's why I could of used a link to the wiki because it would maybe explain.
Like if the random number is 1 then, or if 2 then. |
|
|
| Report Abuse |
|
|
grimm343
|
  |
| Joined: 18 Sep 2008 |
| Total Posts: 2796 |
|
|
| 05 Jan 2012 03:47 PM |
local t = math.random(3)
if t == 1 then elseif t == 2 then elseif t == 3 then end
Also, if you :Clone() an object and parent it to Workspace, and it has unanchored bricks, then you should, immediately after, use :MakeJoints(). |
|
|
| Report Abuse |
|
|
Fl0x
|
  |
| Joined: 06 Aug 2010 |
| Total Posts: 5169 |
|
|
| 05 Jan 2012 03:48 PM |
RandomNumber=math.random(1,2) if RandomNumber==1 then --1 stuff elseif RandomNumber==2 then --2 stuff else print("RandomNumber is NaN") end |
|
|
| Report Abuse |
|
|
|
| 05 Jan 2012 03:49 PM |
| Good to know, thanks. I didn't know that. |
|
|
| Report Abuse |
|
|