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: Need help with random.math

Previous Thread :: Next Thread 
SoulMaster63 is not online. SoulMaster63
Joined: 20 Oct 2014
Total Posts: 15
09 Sep 2017 04:56 PM
I'm trying to get a script to spawn in random amounts of coins when you press a button.
(I got it to spawn a clone of like 4 coins but cant get it to spawn random amounts from like 1-10 coins on press)
How it would work:
1. Player presses button
2. 1 coin
Next player comes and presses the button gets 5 coins or no coins
Report Abuse
BunnyBoy26 is not online. BunnyBoy26
Joined: 17 Jun 2010
Total Posts: 5674
09 Sep 2017 04:58 PM
for i = ################# ## ##### ## = coin:Clone() --- cl.Parent = whatever end
Report Abuse
Mitko0o1 is not online. Mitko0o1
Joined: 30 Nov 2010
Total Posts: 5725
09 Sep 2017 04:59 PM
math.randomseed(tick())
numberOfCoins = math.random(1, 10)
for i=1, numberOfCoins do
coin:Clone().Parent = workspace
end

http://wiki.roblox.com/index.php?title=Random_numbers&redirect=no


help me: https://www.roblox.com/library/1032745459/Support-me-buying-a-russian-cap
Report Abuse
LeafDoode is not online. LeafDoode
Joined: 29 May 2017
Total Posts: 3094
09 Sep 2017 05:00 PM
random.math()

lol
Report Abuse
BunnyBoy26 is not online. BunnyBoy26
Joined: 17 Jun 2010
Total Posts: 5674
09 Sep 2017 05:00 PM
The one time I don't press preview..

for i = won, math.random(then minus h) do -- tags
local c = coin:Clone()
---
c.Parent = whatever
end
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