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: help with this?

Previous Thread :: Next Thread 
vastqud is not online. vastqud
Joined: 10 Sep 2011
Total Posts: 2464
12 Jan 2016 04:44 PM
local explosion = Instance.new("Explosion")

explosion.Parent = workspace

explosion.Position = workspace.TestObject.Position

explosion.BlastRadius = 45
explosion.Hit:connect(function(hitPart, d)
local size = hitPart.Size
local x = size.X
local y = size.Y
local z = size.Z
hitPart:Destroy()
for xi = 1,x do
local newPart = Instance.new("Part")
newPart.Parent = workspace
newPart.Size = Vector3.new(x/5,y/5,z)
newPart.Position = Vector3.new(x/5+xi,y,z)
newPart.Anchored = true
end
end)

it's supposed to fragment a single part into a bunch of smaller ones, which it does, but not very well

the new parts get positioned to a spot under the baseplate

but, they do mostly maintain the shape and size of the original block, so that's good

can anyone help me out with positioning and rotating these blocks so that these new blocks pretty much replace the original one block where it stood?
Report Abuse
vastqud is not online. vastqud
Joined: 10 Sep 2011
Total Posts: 2464
12 Jan 2016 04:49 PM
no one? D:
Report Abuse
vastqud is not online. vastqud
Joined: 10 Sep 2011
Total Posts: 2464
12 Jan 2016 04:56 PM
bump D:
Report Abuse
vastqud is not online. vastqud
Joined: 10 Sep 2011
Total Posts: 2464
12 Jan 2016 05:03 PM
le bumper doodle
Report Abuse
MahouReikon is not online. MahouReikon
Joined: 15 Feb 2014
Total Posts: 1359
12 Jan 2016 05:04 PM
https://scriptinghelpers.org/questions/25869/what-is-the-appropriate-equations-for-smashable-glass#29470


#code 'The Legend of Heroes Sen no Kiseki'
Report Abuse
vastqud is not online. vastqud
Joined: 10 Sep 2011
Total Posts: 2464
12 Jan 2016 05:12 PM
ty
Report Abuse
vastqud is not online. vastqud
Joined: 10 Sep 2011
Total Posts: 2464
12 Jan 2016 05:35 PM
this is what I have now:

local explosion = Instance.new("Explosion")

explosion.Parent = workspace

explosion.Position = workspace.TestObject.Position

explosion.BlastRadius = 45
explosion.Hit:connect(function(hitPart, d)
local size = hitPart.Size
local pos = hitPart.Position
local x = size.X
local y = size.Y
local z = size.Z
local x1 = x/3
local y1 = y/3
local z1 = z
local x2 = x1-pos.X
local y2 = y1-pos.Y
local z2 = z
local positions = {Vector3.new(x2,y2,z2), Vector3.new(x2+x,y2,z2), Vector3.new(x2+(2*x),y2,z2), Vector3.new(x2, y1, z1), Vector3.new(x2 + x, y1, z1), Vector3.new(x2 + (2 * x), y1, z1), Vector3.new(x2, y1, z1), Vector3.new(x2 + x, y1, z1), Vector3.new(x2 + (2 * x), y1, z1),}
local i = 1
while i <= 9 do
wait()
local newPart = Instance.new("Part")
newPart.Anchored = true
newPart.Position = positions[i]
newPart.Parent = workspace
end
hitPart:Destroy()
end)




these parts get positioned somewhere way off the map, and they don't keep the shape and size of the original
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