I am creating a Throwing Weapon to My Friend, it's otherwise fine, but the "Touch" part of the Script reacts too slowly or doesn't react at all. It's supposed to weld the touched part with the throwing object, but it won't react or the part welds too late and it looks weird when it's at like 20 studs or more away the part what is supposed to be welded at. Yes, so it welds it, but not always, and that's why I asked this Question here. How to make "Touch" function of the script react faster? This script is copied to the throwing object:
script.Parent.Touched:connect(function(hit)
local Bforce = script.Parent:FindFirstChild("BodyForce")
if hit.ClassName == "Part" and hit.Parent ~= script.creator.Value and hit.Parent ~= script.sword.Value then
if Bforce then
Bforce:Destroy()
end
local Weld = Instance.new("Weld", hit)
Weld.C1 = hit.CFrame:toObjectSpace(script.Parent.CFrame)
Weld.Part0 = script.Parent
Weld.Part1 = hit
game.Debris:AddItem(script.Parent, 2)
end
end)
Thanks,
Swaggy(Duckie)

1 comment
Touched is a signal, It should be fired the instant you do that event. Maybe your place is lagging?