Arrow Anchoring Early

I’m making a bow and arrow system and the script below tells the arrow to anchor if it doesn’t match one of the names in the single-line if statements AND is also a magnitude of 2 or less.

script.Parent.Touched:Connect(function(hit)
	if hit.Name == "Handle" then return end
	if hit.Name == "Limb" then return end
	if hit.Name == "Torso" then return end
	if hit.Name == "bsp" then return end
	if (hit.Parent:findFirstChild("Humanoid") ~= nil) then return end
	
	script.Parent.CanCollide = true
	
	print((hit.Position - script.Parent.Position).Magnitude)
	if (hit.Position - script.Parent.Position).Magnitude < 2 then
		
		print(hit.Name)
		script.Parent.Anchored = true
		wait(5)
		script.Parent:Destroy()
	end
end)

However, in this video, it shows the arrow anchoring way earlier than hitting the target. It does print the part it’s hit, in this case Target, but it doesn’t anchor at the location.

While I post this, I might as well ask for help on how to rotate the arrow in the direction of the mouse.

Thanks!

Have you set the arrow’s network owner to the player who shot it?

How would I go about doing that?

In a server script, do arrow:SetNetworkOwner(player)

1 Like

It works. However, this introduces a new issue. The arrow now anchors a lot later than it should, so the complete opposite of before lol. There are no wait()s that could slow it down. Any ideas?

Still lost on this. Could someone advise me? Thanks.