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: Split one part into 4 parts

Previous Thread :: Next Thread 
cdw500 is not online. cdw500
Joined: 11 Jun 2014
Total Posts: 141
02 Sep 2014 10:01 PM
How would I split one part into 4 new parts using a script. i have no idea and no results show up online. i just need a push in the right direction. Any ideas?
Report Abuse
xXxBOiL3DxXx is not online. xXxBOiL3DxXx
Joined: 08 Sep 2012
Total Posts: 110
02 Sep 2014 11:02 PM
just calculate the size you want and destroy the original part and Instance.new 4 new parts.
Report Abuse
cdw500 is not online. cdw500
Joined: 11 Jun 2014
Total Posts: 141
02 Sep 2014 11:17 PM
Yes I already had that idea but how would I position them correctly took look like the window has cracked?
Report Abuse
LegendaryAccount is not online. LegendaryAccount
Joined: 02 Jun 2010
Total Posts: 13193
02 Sep 2014 11:38 PM
I suggest making differnt models of this window and replace the old one with a new one with a damaged look to it
Report Abuse
cdw500 is not online. cdw500
Joined: 11 Jun 2014
Total Posts: 141
03 Sep 2014 04:36 PM
I have tried but the model will not be in the exact location I was using MoveTo but it is off some any solutions?
Report Abuse
cdw500 is not online. cdw500
Joined: 11 Jun 2014
Total Posts: 141
03 Sep 2014 04:55 PM
Bump
Report Abuse
Stefan631 is not online. Stefan631
Joined: 23 Dec 2010
Total Posts: 1350
03 Sep 2014 05:26 PM
Um

part = game.Workspace.BrickThing:Clone(); -- Make this the original part.

part1 = Instance.new('Part', workspace);
part1.Size = Vector3.new(part.Size.x/4,part.Size.y, part.z);
part1.Anchored = true;
part1.CFrame = part.CFrame - Vector3.new(part.Size.x/2 + part1.Size.x/2, 0, 0)

part2 = Instance.new('Part', workspace);
part2.Size = Vector3.new(part.Size.x/4,part.Size.y, part.z);
part2.Anchored = true;
part2.CFrame = part.CFrame - Vector3.new(part.Size.x/2 + part1.Size.x, 0, 0)

part3 = Instance.new('Part', workspace);
part3.Size = Vector3.new(part.Size.x/4,part.Size.y, part.z);
part3.Anchored = true;
part3.CFrame = part.CFrame - Vector3.new(part.Size.x/2 +(part1.Size.x * 2), 0)

part4 = Instance.new('Part', workspace);
part4.Size = Vector3.new(part.Size.x/4,part.Size.y, part.z);
part4.Anchored = true;
part4.CFrame = part.CFrame - Vector3.new(part.Size.x * 2 - part1.Size.x/2, 0, 0)

part:Destroy();
game.Workspace.BrickThing:Destroy();



Lawl this was off the top of my head, sorry if it doesn't work right but test it out.
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