I am currently trying to fix an issue with using weld constraints. The neon part is supposed to weld on to the part that it touches yet as shown in the image, it looks like it is getting welded before it even touches the part. (I’m using a touched event so it shouldn’t even happen)
sword.Touched:Connect(function(hit)
if not (hit.Name == "Sword1" or hit.Name == "Sword2" or hit.Name == "Sword3" or hit.Name == "Gate" or hit.Name == "Spear" or hit.Parent == character or hit.parent.Parent == character) and gate then
debris:AddItem(bv,0)
local weld = Instance.new("WeldConstraint")
weld.Parent = sword
weld.Part0 = sword
weld.Part1 = hit
sword.CanTouch = false
wait()
local rope = sword:FindFirstChild("RopeConstraint")
if gate:FindFirstChild("Attachment") and rope then
rope.Attachment0 = gate.Attachment
rope.Attachment1 = sword.Attachment
end
rope.Length = (hit.Position - gate.Position).Magnitude + 0.5
rope.Enabled = true
local sound2 = game.ReplicatedStorage:WaitForChild("Stab"):Clone()
sound2.Parent = sword
sound2:Play()
debris:AddItem(sound2,sound2.TimeLength + 0.2)
swordfx(false)
end