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
 

Why doesn't this sizing work?

Previous Thread :: Next Thread 
CHATTERMOUTH is not online. CHATTERMOUTH
Joined: 18 Nov 2010
Total Posts: 1595
18 Oct 2015 07:53 PM
while true do

wait(5)
local part = Instance.new("Part", workspace)
part.BrickColor = BrickColor.new("Lily white")
part.Size = Vector3.new(math.random(104.4, 4.8, 63.6,71.8, 4.6, 63.6))
part.CFrame = CFrame.new(-1027.8, 100.9, 13.2)


end

I get this error: "17:52:13.417 - Workspace.Script:6: wrong number of arguments"

Help please?


You sat in my subforum!! NOW I AM GOING TO EAT YOU!!!
Report Abuse
airstriker4 is not online. airstriker4
Joined: 27 Jul 2012
Total Posts: 5831
18 Oct 2015 07:56 PM
You are only setting X in the Vector3
part.Size = Vector3.new(math.random(104.4, 4.8),math.random(63.6,71.8),math.random(4.6, 63.6))
Report Abuse
CHATTERMOUTH is not online. CHATTERMOUTH
Joined: 18 Nov 2010
Total Posts: 1595
18 Oct 2015 08:04 PM
@Air

Even after fixing that, a new error occurs

NEW SCRIPT

while true do

wait(5)
local part = Instance.new("Part", workspace)
part.BrickColor = BrickColor.new("Lily white")
part.Size = Vector3.new(math.random(104.4, 4.8),math.random(63.6,71.8),math.random(4.6, 63.6))
part.CFrame = CFrame.new(-1027.8, 100.9, 13.2)


end


NEW ERROR

"18:03:39.024 - Workspace.Script:6: bad argument #2 to 'random' (interval is empty)"


You sat in my subforum!! NOW I AM GOING TO EAT YOU!!!
Report Abuse
wonderful72pike is not online. wonderful72pike
Joined: 13 Jul 2010
Total Posts: 7009
18 Oct 2015 08:06 PM
That happens when you order the arguments in math.random() wrong. The one on the left HAS to be smaller then the one on the right. 4.8 has to be on the left and 104.4 has to be on the right, for the first one. Do that to the other two too.
Report Abuse
CHATTERMOUTH is not online. CHATTERMOUTH
Joined: 18 Nov 2010
Total Posts: 1595
18 Oct 2015 08:22 PM
@Wonder @Air

Thanks :)


You sat in my subforum!! NOW I AM GOING TO EAT 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