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 » Scripters
Home Search
 

Re: Help with random number generator?

Previous Thread :: Next Thread 
JiggIypuffs is online. JiggIypuffs
Joined: 04 Feb 2011
Total Posts: 4346
26 Apr 2016 04:17 PM
So I made this script that moves stuff in the lighting to workspace. however, it only pulls one of the items. heres the script

number = math.random(1,4)

while true do
if number == 1 then
wait(5)
print(number)
game.Lighting.Teapot3:Clone().Parent = Workspace.Satelite
end

if number == 2 then
wait(4)
print(number)
game.Lighting.Teapot2:Clone().Parent = Workspace.Satelite
end

if number == 3 then
wait(3)
print(number)
game.Lighting.Teapot1:Clone().Parent = Workspace.Satelite
end

if number == 4 then
wait(2)
print(number)
game.Lighting.Teapot:Clone().Parent = Workspace.Satelite
end
end

~just a wild jigglypuff
Report Abuse
AxonMega is not online. AxonMega
Joined: 29 Aug 2014
Total Posts: 2403
26 Apr 2016 04:18 PM
Put the number = math.random(1,4) inside the loop.

--your welcome
Report Abuse
JiggIypuffs is online. JiggIypuffs
Joined: 04 Feb 2011
Total Posts: 4346
26 Apr 2016 04:23 PM
ty

~just a wild jigglypuff
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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