generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Another question,

Previous Thread :: Next Thread 
Sunsshines is not online. Sunsshines
Joined: 16 Sep 2012
Total Posts: 8395
03 May 2013 03:14 PM
m = {1, 2, 3}

while true do

i = - How do i make it get Math.random for m? I forgot the lines for it.
i:clone().Parent = Workspace
wait(50)
i:remove()

end

-- Unless i completely screwed up the stuff here, it's suppose to get random items from m (ex: Randomly choose 1, 2, or 3), clone it to the workspace, wait, then remove it and choose a new random.

Report Abuse
Mathfreak231 is not online. Mathfreak231
Joined: 21 Jun 2010
Total Posts: 5311
03 May 2013 03:15 PM
local i = m[math.random(1, #m)]

~This sig is false~
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
03 May 2013 03:17 PM
m = {1, 2, 3}

while true do
local ran = m[math.random(1, #m)]
i:clone().Parent = Workspace
wait(50)
i:remove()
wait(1)
end
Report Abuse
Sunsshines is not online. Sunsshines
Joined: 16 Sep 2012
Total Posts: 8395
03 May 2013 03:51 PM
@Cheese,

Used the line, stackend at i:clone.

I changed ran, did not work, so i changed it back.

I then changed the i's, did not work, so i changed it back.
Report Abuse
Sunsshines is not online. Sunsshines
Joined: 16 Sep 2012
Total Posts: 8395
03 May 2013 04:01 PM
bump
Report Abuse
As8D is not online. As8D
Joined: 24 Dec 2009
Total Posts: 2907
03 May 2013 04:03 PM
Really...

You can't clone a NUMBER, right?

i is a number, after all... not an instance.


So yeah, tell us where the objects to be randomly selected is located, and it can be made far more flexible.


- As, sjapum, I'm bored. No big news? Ohwell, then it's small news.
Report Abuse
Sunsshines is not online. Sunsshines
Joined: 16 Sep 2012
Total Posts: 8395
03 May 2013 04:16 PM
@As: If your going to complain then leave, i don't want to hear it.

Report Abuse
As8D is not online. As8D
Joined: 24 Dec 2009
Total Posts: 2907
03 May 2013 04:47 PM
Noep.

I'm just pointing out what's causing the script to error for you to shout "OH YES, THAT WAS THE PROBLEM! HOORAI!"

^


But still; tell me where your objects are located, so we can produce you an effective and flexible script.


- As, OH YES, NUMBERS! Quadratic numbers... leet numbers... wuz?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image