So here is what I've stuck together, and has some ALRIGHT results, looking like this: https://gyazo.com/f7a370680579f3669a9522db4e2a6e1a
The bits in front are products of the script, and the bit behind is a replica of the part that was converted
local event = game.ReplicatedStorage.Remotes.Weapon.Smash
function event.OnServerInvoke(plr, objHit)
--MATHS
local size = objHit.Size
local centerpos = objHit.Position
local width = size.X / 3
local hight = size.Y / 3
local x1 = centerpos.X * 2
local x2 = x1 / 3
local y = centerpos.Y * 2
local y2 = y / 3
local position = Vector3.new(x2, y2, centerpos.Z)
local sizenew = Vector3.new(width / 3, hight / 3, size.Z)
local positions = {{position.X, position.Y, position.Z}, {position.X + width, position.Y, position.Z}, {position.X + (width * 2), position.Y, position.Z}--//Firstline--//
, {position.X, position.Y - hight, position.Z}, {position.X + width, position.Y - hight, position.Z}, {position.X + (width * 2), position.Y - hight, position.Z},--//Secondline--//
{position.X, position.Y - (hight*2), position.Z}, {position.X + width, position.Y - (hight*2), position.Z}, {position.X + (width * 2), position.Y - (hight*2), position.Z}}--//Thirdline//--
--Generate
objHit.CanCollide = false
local i = 1
while i <= 9 do
local pos = positions[i]
local shard = Instance.new("Part", workspace)
shard.Transparency = objHit.Transparency
shard.Reflectance = objHit.Transparency
shard.Anchored = false
shard.CanCollide = true
shard.FormFactor = Enum.FormFactor.Custom
shard.Name = "Glass"
shard.Position = Vector3.new(pos[1], pos[2], pos[3])
shard.Size = sizenew
shard.Anchored = true
i = i + 1
end
objHit.Transparency = 1
end
