|
| 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 |
|
|
|
| 09 Sep 2017 04:58 PM |
| for i = ################# ## ##### ## = coin:Clone() --- cl.Parent = whatever end |
|
|
| Report Abuse |
|
|
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
|
  |
| Joined: 29 May 2017 |
| Total Posts: 3094 |
|
| |
|
|
| 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 |
|
|