You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve?
I Want To Make It So A Sword Can Cut Pieces In Half Around Random Pivot -
What is the issue?
It Doesn’t Union And There’s No Error
-
What solutions have you tried so far?
I tried rewritting the code 2 times and developer
script.Parent.Blade.Touched:Connect(function(hit)
local humanoid = hit:FindFirstChild("Breakable")
if cooldown == false then
cooldown = true
local hitclone = hit:Clone()
local hit = game.Workspace.TestWall
local hitclone = game.Workspace.TestWall:Clone()
hitclone.Position = hit.Position
print(hitclone)
hitclone.Parent = game.Workspace
hitclone.Color = Color3.fromRGB(255, 0, 0)
local negative = game.ReplicatedStorage.CuttingZone:Clone()
negative.CutPivot.Orientation = Vector3.new(0,0,math.random(1,90))
negative.CutPivot.Position = script.Parent.Parent.HumanoidRootPart.Position
negative.NegativePart1.Anchored = true
negative.NegativePart2.Anchored = true
negative.NegativePart1.Transparency = 0.5
local negative1 = negative.NegativePart1
local negative2 = negative.NegativePart2
negative.CutPivot.Parent = game.Workspace
negative.NegativePart1.Parent = game.Workspace
negative.NegativePart2.Parent = game.Workspace
negative:Destroy()
hitclone:UnionAsync({negative1,hitclone})
hit:UnionAsync({negative2,hit})
cooldown = true
wait(10)
cooldown = false
end
end)