this is the script:
if (targetPosition - character.Torso.Position).Magnitude <= 450 and target.Name ~= "Barrier" then
if side == "Left" then
lHook1 = character.LeftHook.Handle.LHook1
grapple = Instance.new("Part")
grapple.Name = "Grapple"
grapple.Size = Vector3.new(0.1,0.1,0.1)
grapple.Position = lHook1.WorldPosition
grapple.CanCollide = false
grapple.Massless = true
grapplePosition = Instance.new("BodyVelocity", grapple)
grapplePosition.Velocity = CFrame.new(character.Torso.Position, targetPosition).LookVector * grappleSpeed
grapplePosition.P = 0
grapple.Parent = workspace
lHook2 = Instance.new("Attachment", grapple)
lWire = Instance.new("Beam", lHook1)
lWire.Color = ColorSequence.new(Color3.fromRGB(0, 0, 0))
lWire.LightEmission = 0
lWire.LightInfluence = 1
lWire.TextureLength = 0.1
lWire.TextureSpeed = 0
lWire.Transparency = NumberSequence.new(0)
lWire.Width0 = 0.1
lWire.Width1 = 0.1
lWire.FaceCamera = true
lWire.Attachment0 = lHook1
lWire.Attachment1 = lHook2
wait(0.1)
grapple.Touched:Connect(function(hit)
print(hit)
grapple.Anchored = true
grapplePosition:Destroy()
end)
end
there is an example:
the part that is printed is the part where I shoot

4 comments
It's because it is a part touching it.
Make sure the target is a vaild instance or someway of checking that
But it says that is touching the part which I shoot it, but it haven't touch it yet
Why not use rays with ignore lists, Blacklist the character to avoid the hook from hitting the tool and chr.