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: Creating a brick next to another brick

Previous Thread :: Next Thread 
DavidBowiesEyes is not online. DavidBowiesEyes
Joined: 15 Nov 2010
Total Posts: 13270
30 Jul 2011 07:02 PM
I keep forgetting how to create a brick to the left of another brick no matter its rotation. Anyone?
Report Abuse
chikenugget is not online. chikenugget
Joined: 09 May 2009
Total Posts: 2552
30 Jul 2011 07:05 PM
brick = Instance.new("Part")
brick.Position + Vector3.new(5,0,0)
brick.Size = Vector3.new(4,4,4)
?
Report Abuse
landon90 is not online. landon90
Joined: 26 Dec 2008
Total Posts: 1847
30 Jul 2011 07:08 PM
I think this may work

block = Instance.new("Part")
block.Position = game.Workspace.OTHERBRICKNAME.Position
block.Size = game.Workspace.OTHERBRICKNAME.Size
Report Abuse
DavidBowiesEyes is not online. DavidBowiesEyes
Joined: 15 Nov 2010
Total Posts: 13270
30 Jul 2011 07:09 PM
Neither of those would work.
Report Abuse
chikenugget is not online. chikenugget
Joined: 09 May 2009
Total Posts: 2552
30 Jul 2011 07:11 PM
Wait, try this, sorry.


otherbrick =
brick = Instance.new("Part")
brick.Position = otherbrick.Position + Vector3.new(5,0,0)
brick.Size = Vector3.new(4,4,4)
Report Abuse
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
30 Jul 2011 07:12 PM
Fixed version:

block = Instance.new("Part", Workspace)
block.Position = game.Workspace.OTHERBRICKNAME.Position
block.Size = game.Workspace.OTHERBRICKNAME.Size

@2nd poster lrn2scrpt
Report Abuse
DavidBowiesEyes is not online. DavidBowiesEyes
Joined: 15 Nov 2010
Total Posts: 13270
30 Jul 2011 07:12 PM
No, no, those are both the same as the original 2...
Report Abuse
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
30 Jul 2011 07:14 PM
I made the part's parent Workspace which they didn't...
Report Abuse
landon90 is not online. landon90
Joined: 26 Dec 2008
Total Posts: 1847
30 Jul 2011 07:14 PM
Oh I know what I forgot to do.
I forgot to add in

block.Parent = game.Workspace
Report Abuse
landon90 is not online. landon90
Joined: 26 Dec 2008
Total Posts: 1847
30 Jul 2011 07:14 PM
I think this may work

block = Instance.new("Part")
block.Parent = game.Workspace
block.Position = game.Workspace.OTHERBRICKNAME.Position
block.Size = game.Workspace.OTHERBRICKNAME.Size

Report Abuse
DavidBowiesEyes is not online. DavidBowiesEyes
Joined: 15 Nov 2010
Total Posts: 13270
30 Jul 2011 07:15 PM
You guys don't seem to understand what I'm asking for.
Report Abuse
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
30 Jul 2011 07:16 PM
Wait this should be better:

block = Instance.new("Part", Workspace)
block.Size = Vector3.new(5,5,5) --Can be changed into anything.
block.Position = game.Workspace.OTHERBRICKNAME.Position + Vector3.new(block.Size.X + 1, 0, 0)
Report Abuse
unknown89089 is not online. unknown89089
Joined: 21 Aug 2008
Total Posts: 2961
30 Jul 2011 07:16 PM
-.-'' he means copying the rotation of the other brick, it'll be exactly right next to it.
Report Abuse
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
30 Jul 2011 07:17 PM
He could had explained better...

block = Instance.new("Part", Workspace)
block.Size = Vector3.new(5,5,5) --Can be changed into anything.
block.CFrane = game.Workspace.OTHERBRICKNAME.CFrame + Vector3.new(block.Size.X + 1, 0, 0)
Report Abuse
DavidBowiesEyes is not online. DavidBowiesEyes
Joined: 15 Nov 2010
Total Posts: 13270
30 Jul 2011 07:17 PM
Yeah, what unknown said. I couldn't think of a way to explain it better.
Report Abuse
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
30 Jul 2011 07:18 PM
Made a typo sorry.

block = Instance.new("Part", Workspace)
block.Size = Vector3.new(5,5,5) --Can be changed into anything.
block.CFrame = game.Workspace.OTHERBRICKNAME.CFrame + Vector3.new(block.Size.X + 1, 0, 0)
Report Abuse
DavidBowiesEyes is not online. DavidBowiesEyes
Joined: 15 Nov 2010
Total Posts: 13270
30 Jul 2011 07:28 PM
This might be what I'm looking for... But what's the block.Size.X + 1 for?
Report Abuse
swimguy777 is not online. swimguy777
Joined: 30 May 2009
Total Posts: 17092
30 Jul 2011 07:28 PM
b = BLOCK YOU WANT THE PART TO BE NEXT TO
p = Instance.new("Part",workspace)
p.CFrame = b.CFrame + Vector3.new(5,0,0)
Report Abuse
DavidBowiesEyes is not online. DavidBowiesEyes
Joined: 15 Nov 2010
Total Posts: 13270
30 Jul 2011 07:41 PM
Nope, not what I need.
Report Abuse
smurf279 is not online. smurf279
Joined: 15 Mar 2010
Total Posts: 6871
30 Jul 2011 08:04 PM
Instance.new("Part", Workspace).CFrame = game.Workspace.OTHERBRICKNAME.CFrame + Vector3.new(5, 0, 0)

Report Abuse
DavidBowiesEyes is not online. DavidBowiesEyes
Joined: 15 Nov 2010
Total Posts: 13270
30 Jul 2011 08:41 PM
Same as the others.
Report Abuse
Spectrumw is not online. Spectrumw
Joined: 04 Aug 2009
Total Posts: 13510
30 Jul 2011 08:42 PM
local c = Workspace["Part"]:Clone()
c.CFrame = Workspace["Part"].CFrame * CFrame.new(c.Size.x / 2, 0, 0)
c.Parent = Workspace
Report Abuse
DavidBowiesEyes is not online. DavidBowiesEyes
Joined: 15 Nov 2010
Total Posts: 13270
30 Jul 2011 09:37 PM
I'll try that next, but what's the c.Size.x / 2 for?
Oh, I think I get it now. I did't need that, but thanks anyway :P
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
30 Jul 2011 09:40 PM
[ Content Deleted ]
Report Abuse
DavidBowiesEyes is not online. DavidBowiesEyes
Joined: 15 Nov 2010
Total Posts: 13270
30 Jul 2011 09:43 PM
Spectrum, yours worked. Thanks.
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