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
This is just a small update that consists of sound support, and a new weld debris value for the system
Additions:
Improvements:
Side notes:
the next gen roblox rocket launcher is coming soonā¦
Other than that, it looks AWESOME!
Are you able to set how many shards there can be. Because maybe I want more debris. 0-0
no, but i have tried adding this feature. More debris makes more triangles which causes lag, and removes the āshatterā illusion.
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.
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.
This is really fun to play around with, itās well done.
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)
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 !
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
How can i put like, some kind of a health to break the part?
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
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:
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!! )
This module only supports blocks and it will only break properly along the X axis. This module is pretty bare bones