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: Basic Algorithm question

Previous Thread :: Next Thread 
Tundradusk is not online. Tundradusk
Joined: 30 Mar 2015
Total Posts: 15
06 Apr 2015 05:07 PM
Ok so where in the script do I need to edit to change how spread out the parts are?

c = {BrickColor.Green(), BrickColor.Gray(), BrickColor.Random()}
for i = 1, 400 do

local part = Instance.new("Part", workspace)
part.Material = "Grass"
part.TopSurface = "Smooth"
part.BottomSurface = "Smooth"

part.Anchored = true
part.Size = Vector3.new(math.random(20), math.random(30), math.random(20))
part.CFrame = CFrame.new(math.random(-100, 100), part.Size.Y/2, math.random(-100, 100))
part.BrickColor = c[math.random(#c)]
end
Report Abuse
vividtrip is not online. vividtrip
Joined: 14 Oct 2008
Total Posts: 2890
06 Apr 2015 05:12 PM
Erm, the parts are moved to a totally random location. There's no real way to define how they are distributed, apart from modifying the position value stuff.

[very moisty]
Report Abuse
Tundradusk is not online. Tundradusk
Joined: 30 Mar 2015
Total Posts: 15
06 Apr 2015 05:13 PM
Ehh..that's a good point.
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
06 Apr 2015 05:14 PM
Just change the numbers inside the math.random's which are inside the CFrame value. For more spread, make the numbers biggers. vice versa
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