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
 

Re: I'm trying to get the vertices of a brick

Previous Thread :: Next Thread 
LordMatthewII is not online. LordMatthewII
Joined: 20 Aug 2011
Total Posts: 10873
08 Aug 2014 04:49 PM
Like how a brick has 12? I want to get those, I was able to get one but I cant figure out the rest.

local pc=part.Position
local ps=part.Size

local xp=pc.X
local yp=pc.Y
local zp=pc.Z

local xs=ps.X/2
local ys=ps.Y/2
local zs=ps.Z/2

local v1=pc+Vector3.new(xs,ys,zp)
Report Abuse
LordMatthewII is not online. LordMatthewII
Joined: 20 Aug 2011
Total Posts: 10873
08 Aug 2014 04:53 PM
I think I was able to get them, please check my math.


local pc=part.Position
local ps=part.Size

local xs=ps.X/2
local ys=ps.Y/2
local zs=ps.Z/2

local v1=pc+Vector3.new(xs,ys,0)
local v2=pc+Vector3.new(xs,-ys,0)
local v3=pc+Vector3.new(xs,0,zs)
local v4=pc+Vector3.new(xs,0,-zs)
local v5=pc+Vector3.new(0,ys,zs)
local v6=pc+Vector3.new(0,-ys,zs)
local v7=pc+Vector3.new(xs,ys,0)
local v8=pc-Vector3.new(xs,-ys,0)
local v9=pc-Vector3.new(xs,0,zs)
local v10=pc-Vector3.new(xs,0,-zs)
local v11=pc-Vector3.new(0,ys,zs)
local v12=pc-Vector3.new(0,-ys,zs)
Report Abuse
Vuva is not online. Vuva
Joined: 22 Jan 2010
Total Posts: 1102
08 Aug 2014 04:55 PM
Erm, a brick has 8 verticise?
Report Abuse
LordMatthewII is not online. LordMatthewII
Joined: 20 Aug 2011
Total Posts: 10873
08 Aug 2014 04:58 PM
OMG IT DOES WORK THIS HAS TO BE THE FIRST HIGH MATH THING I'VE DONE EVER
Report Abuse
LordMatthewII is not online. LordMatthewII
Joined: 20 Aug 2011
Total Posts: 10873
08 Aug 2014 04:59 PM
Sorry I mean edges
Report Abuse
LordMatthewII is not online. LordMatthewII
Joined: 20 Aug 2011
Total Posts: 10873
08 Aug 2014 05:01 PM
Okay I have this so far, how do I make the new part as long as the sides are?

local pc=part.Position
local ps=part.Size

local xs=ps.X/2
local ys=ps.Y/2
local zs=ps.Z/2
local points={
pc+Vector3.new(xs,ys,0),
pc+Vector3.new(xs,-ys,0),
pc+Vector3.new(xs,0,zs),
pc+Vector3.new(xs,0,-zs),
pc+Vector3.new(0,ys,zs),
pc+Vector3.new(0,-ys,zs),
pc-Vector3.new(xs,ys,0) ,
pc-Vector3.new(xs,-ys,0),
pc-Vector3.new(xs,0,zs),
pc-Vector3.new(xs,0,-zs),
pc-Vector3.new(0,ys,zs),
pc-Vector3.new(0,-ys,zs)}

for v,i in pairs(points)do
local part=Instance.new("Part",workspace)
part.FormFactor='Custom'
part.Anchored=true
part.Size=Vector3.new(.2,.2,.2)
part.CFrame=CFrame.new(i)
end
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