Otrof
|
  |
| Joined: 18 Jan 2015 |
| Total Posts: 94 |
|
|
| 30 Jan 2015 05:05 PM |
I would go to the help forum but I don't see
can someone help me with this?
local clrz = Instance.new("Frame") clrz.Parent = script.Parent
while true do clrz.Size = UDim2.new(0, 20, 0, 20) clrz.BackgroundColor3 = Color3.new(27/255, 42/255, 53/255) clrz.Position = UDim2.new(math.random(0.9, 0, 0.9, 0)) wait(0.1) end
I'm trying to make it pop up in random positions
this is what output says 18:04:41.474 - Players.Player.PlayerGui.ScreenGui.Background.Script:7: wrong number of arguments 18:04:41.475 - Script 'Players.Player.PlayerGui.ScreenGui.Background.Script', Line 7 18:04:41.475 - Stack End |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 30 Jan 2015 05:06 PM |
| math.random() take 2 arguments max |
|
|
| Report Abuse |
|
|
|
| 30 Jan 2015 05:09 PM |
math.random works like this math.random([a[, b]]) If you have one argument, it needs to be 1 or more and it will return a random integer between 1 and a. If you have no arguments, it will return a random number between 0 and 1. If you have both arguments, b must be greater or equal to a and it will return a random integer between them. |
|
|
| Report Abuse |
|
|
Otrof
|
  |
| Joined: 18 Jan 2015 |
| Total Posts: 94 |
|
| |
|