Hey there,
I was messing around with the new Real Time CSG stuff by starting with a block that would cut through any part it touches
Everything works fine except i have to wait a bit before moving or else it just start duplicating the block im cutting into for no reason
i just want to smoothly move through the block to cut it like a laser as shown in the devforum announcement examples like the “laser tank”
Here is my script thats inside of the red part (the one thats cutting through the yellow part)
script.Parent:GetPropertyChangedSignal("Position"):Connect(function()
local parts = workspace:GetPartBoundsInBox(script.Parent.CFrame,script.Parent.Size)
for i,v in parts do
if v.Color == Color3.new(1, 1, 0) then
local success, newSubtract = pcall(function()
return v:SubtractAsync({script.Parent},Enum.CollisionFidelity.PreciseConvexDecomposition)
end)
if success and newSubtract then
newSubtract.Position = v.Position
newSubtract.Parent = workspace
v:Destroy()
end
end
end
end)
Any help is appreciated