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 » Scripting Helpers
Home Search
 

Grid block spawn?

Previous Thread :: Next Thread 
POC0bob is not online. POC0bob
Joined: 20 Feb 2010
Total Posts: 549
13 Jul 2011 09:10 PM
Hiya, so. How exactly would you create a block maker that creates blocks on a 7x7x7 grid, like in roblox's welcome to roblox game, the stamp tool it makes blocks only on an invisible grid... i understand no requests, this isnt a request, its asking for help... how could i do this? D:
Report Abuse
Jinxy is not online. Jinxy
Joined: 04 Aug 2007
Total Posts: 18317
13 Jul 2011 09:11 PM
instance.new("Part") there might be more to this....
Report Abuse
POC0bob is not online. POC0bob
Joined: 20 Feb 2010
Total Posts: 549
13 Jul 2011 09:12 PM
haha that helped me none :P i know how to script really well, i am just stuck on this... not sure how i can do this..
Report Abuse
Jinxy is not online. Jinxy
Joined: 04 Aug 2007
Total Posts: 18317
13 Jul 2011 09:14 PM
well You could try

setting the new part's properties of the x, y, and z to 7. I don't know the exact code.
Report Abuse
POC0bob is not online. POC0bob
Joined: 20 Feb 2010
Total Posts: 549
13 Jul 2011 09:18 PM
just changing the position wouldnt help... its a tool, that when you click... it copys an object from the lighting, i already have the whole script but it doesnt create blocks on a grid of 7x7x7...
Report Abuse
Jinxy is not online. Jinxy
Joined: 04 Aug 2007
Total Posts: 18317
13 Jul 2011 09:19 PM
Oh .-. I don't know how to help. You'd need a more advanced scripter than I.
Report Abuse
POC0bob is not online. POC0bob
Joined: 20 Feb 2010
Total Posts: 549
13 Jul 2011 09:21 PM
haha :) thanks for replying though.
Report Abuse
sonicdiablo is not online. sonicdiablo
Joined: 05 Feb 2009
Total Posts: 1661
13 Jul 2011 09:47 PM
Smallest divider(or PPCD in french)
Report Abuse
sonicdiablo is not online. sonicdiablo
Joined: 05 Feb 2009
Total Posts: 1661
13 Jul 2011 09:50 PM
oops i meant, you divide the number by 7, then you remove the decimals,and you multiplie back 15/7 = 2.14285 using math function = 2 * 7 = 14

you also look if it stay in the grid
Report Abuse
POC0bob is not online. POC0bob
Joined: 20 Feb 2010
Total Posts: 549
13 Jul 2011 09:54 PM
you mean like math.Ceil? rounds the number up?
Report Abuse
sonicdiablo is not online. sonicdiablo
Joined: 05 Feb 2009
Total Posts: 1661
13 Jul 2011 10:00 PM
ya
Report Abuse
POC0bob is not online. POC0bob
Joined: 20 Feb 2010
Total Posts: 549
13 Jul 2011 10:04 PM
So, to lock objects to a grid, you would use this math equasion: Part being the object i want to use on a grid:

yg = Part.Position.Y/7
yg = yg* 7

Part.Position.Y = yg
Report Abuse
sonicdiablo is not online. sonicdiablo
Joined: 05 Feb 2009
Total Posts: 1661
13 Jul 2011 10:07 PM
yg = Part.Position.Y/7
yg = math.ceil(yg)
yg = yg*2
if part.Position.Y > 0 and part.Position.Y < 21 then

end
Report Abuse
sonicdiablo is not online. sonicdiablo
Joined: 05 Feb 2009
Total Posts: 1661
13 Jul 2011 10:08 PM
Change the condition statement if it is'nt your requirements
Report Abuse
POC0bob is not online. POC0bob
Joined: 20 Feb 2010
Total Posts: 549
13 Jul 2011 10:12 PM
why did you multiply by 2, and not 7?
Report Abuse
sonicdiablo is not online. sonicdiablo
Joined: 05 Feb 2009
Total Posts: 1661
13 Jul 2011 10:16 PM
Lol sorry i did an error,7 not 2 XD
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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