The script is supposed to clone a dummy and whenever the dummy hits a part, it gets destroyed.
the cloning part works but when it hits a part it doesnt disappear.
script.Parent.Triggered:Connect(function(plr)
local Dummy = game.ServerStorage.Dummy:Clone()
Dummy.Parent = game.Workspace
local NewConstraint = Instance.new("WeldConstraint")
NewConstraint.Parent = game.Workspace.Claw.Holder
NewConstraint.Part0 = game.Workspace.Claw.Holder
NewConstraint.Part1 = Dummy.Head
// ignore the positoning
Dummy.Head.Position = game.Workspace.Claw.DummyPos.Head.Position
Dummy.HumanoidRootPart.Position = game.Workspace.Claw.DummyPos.HumanoidRootPart.Position
Dummy["Left Arm"].Position = game.Workspace.Claw.DummyPos["Left Arm"].Position
Dummy["Left Leg"].Position = game.Workspace.Claw.DummyPos["Left Leg"].Position
Dummy["Right Arm"].Position = game.Workspace.Claw.DummyPos["Right Arm"].Position
Dummy["Right Leg"].Position = game.Workspace.Claw.DummyPos["Right Leg"].Position
Dummy.Torso.Position = game.Workspace.Claw.DummyPos.Torso.Position
Dummy.leftArmWeld.Position = game.Workspace.Claw.DummyPos.leftArmWeld.Position
Dummy.leftLegWeld.Position = game.Workspace.Claw.DummyPos.leftLegWeld.Position
Dummy.rightArmWeld.Position = game.Workspace.Claw.DummyPos.rightArmWeld.Position
Dummy.rightLegWeld.Position = game.Workspace.Claw.DummyPos.rightLegWeld.Position
Dummy.torsoWeld.Position = game.Workspace.Claw.DummyPos.torsoWeld.Position
//
if Dummy.Head.Position == game.Workspace.Claw.DummyPos.Head.Position then
script.Parent.Enabled = false
local touch = game.Workspace.Claw.ClawHelper
touch.Touched:Connect(function(hit)
print(hit.Name)
if hit.Name == "Torso" then
Dummy:Destroy()
script.Parent.Enabled = true
end
end)
end
end)
why won’t the dummy get destroyed? any tips?