Part fracturing system V3

Update V3

This is just a small update that consists of sound support, and a new weld debris value for the system

Additions:

  • Sound support
  • Weld debris option (bool)

Improvements:

  • N/A

Side notes:

  • The thread for this system has been updated a bit
7 Likes

Very nice! I made a system that works using the exact same principles a while back.

1 Like

the next gen roblox rocket launcher is coming soonā€¦

Other than that, it looks AWESOME!

1 Like

Are you able to set how many shards there can be. Because maybe I want more debris. 0-0

1 Like

no, but i have tried adding this feature. More debris makes more triangles which causes lag, and removes the ā€˜shatterā€™ illusion.

2 Likes

Ah ok. Also I do expect more lag. I think what I was thinking was from you breaking the wall. Realistically there would be maybe a few more shards depending on itā€™s density. Thanks off answering.

3 Likes

You could try to make ā€œmore trianglesā€ anchored once they stopped moving, it makes not struggle to run.

Or if it didnt work, you could make complicated / basic raycasting + applying animation to make it seem like itā€™s falls by hit position from ray caster, it uses tweening and doesnt require physics.

2 Likes

This is really fun to play around with, itā€™s well done.

https://gyazo.com/a619e0453ccd5613632747fd6bd24e96

1 Like

So im using this system right now but theres a bug. you can see what it is in the vid below
https://streamable.com/qjqjgc
heres my script

local Module = require(script:WaitForChild("PartFractureModule"))
script.Parent.BreakGlass.OnServerEvent:Connect(function(player, position, hit, rotate)
	local attach = Instance.new("Attachment")
	attach.Parent = hit
	attach.Name = "BreakingPoint"
	attach.Visible = true
	wait(1)
	local BreakingPoint = hit:FindFirstChild("BreakingPoint")
	if BreakingPoint and BreakingPoint:IsA("Attachment") then
		BreakingPoint.Position = Vector3.new(BreakingPoint.Position.X, BreakingPoint.Position.Y, BreakingPoint.Position.Z) 
		Module.FracturePart(hit)
		print(BreakingPoint.WorldPosition)
		print(position)
	end
end)
3 Likes

Oh, this system currently only works on one axis. Thereā€™s nothing wrong with your script.

Currently parts will have to be sized like so
(XThickness, YHeight, ZWidth)

your partā€™s face has to be the X axis. (I know it should be Z, but thatā€™s just what I chose at the time.)

Oh ok thanks for telling me that !

1 Like

Is there any way to make it work on all axis?

Unless you redo the entire system, no. This is just a simple 2D fracture system. Doing a 3D fracture system would be very complicated.

Complicated, but possible :smirk:

1 Like

How can i put like, some kind of a health to break the part?

1 Like

Holy smokes I was just browsing through the dev form when I found this. I will definitely be putting this to good use in my own project

1 Like

You could use a number value, that when the part is hit it checks the velocity of the part that hit it and takes away a number off that value, once the value reaches 0 break the glass

Experiencing some very typicalā€¦ behavior from the module.

local BreakingPoint = newPoint
BreakingPoint.Position = playermousehitpositionthing
require(ServerModules.PartFractureModule).FracturePart(PartHit)

Instance Config:
image

This is probably because the system isnā€™t 3D. It looks like the parts you are trying to break are on all axis but I could be wrong! (that didnā€™t make much sense and iā€™m not good at this type of stuff sorry!! :sweat_smile:)

This module only supports blocks and it will only break properly along the X axis. This module is pretty bare bones

1 Like