So for projectiles in my game I want them to send chunks fly away when it hits a part but I dont know how to do this. I would be glad if someone could teach me the process on how I can create something similiar to the gif I will put down below.
What I would have done is probably just create random sized cubes of that material and colour and just give it a random velocity.
here’s some pseudocode to visualize what I’d do a bit.:
event.triggered:connect(function() -- whenever you detect it touching the ground
for i = 1,20 do
local part = instance.new("part")
part.color = hitpart.brickcolor
part.material = hitpart.material
part.position = hitpart.position
part.size = vector3.new(math.random(1,5),math.random(1,5),math.random(1,5))
part.velocity = vector3.new(math.random(1,5),math.random(1,5),math.random(1,5))
debris:additem(part,5)
end
end)