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
 

First time scripter here

Previous Thread :: Next Thread 
Otrof is not online. 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 is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
30 Jan 2015 05:06 PM
math.random() take 2 arguments max
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
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 is not online. Otrof
Joined: 18 Jan 2015
Total Posts: 94
30 Jan 2015 05:14 PM
thank you
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