I'm making this bow that fires an arrow. Everything works fine however the arrow just disappears mid air, I have worked out this is because it somehow already knows where it's going to land so it just destroys itself.
local function OnTouched(hit)
local Gamer = Players:GetPlayerFromCharacter(hit.Parent)
if not Gamer then
print("NPC")
local Bow = hit.Parent.ClassName
local animate = hit.Parent:FindFirstChild("Humanoid")
if animate and Gamer == nil then
hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - Damage
Arrow:Destroy()
elseif Bow =="Tool" then
else
Arrow:Destroy()
print(hit)
end
return end
It's supposed to check Hit.Parent if it's a player if not then it checks if it has a Humanoid then does damage to the Humanoid but if not it checks if it hits the Tool/Bow if it's the bow that it has hit it continues until it hits a object like a wall or terrain the destroys itself. But for some reason it just destroys itself without needing to visually touching the object.

5 comments
Does it destroy itself just before hitting the target because if so I had the same problem and it perplexed me too!!!
Your problem is almost unbelievable to someone who has not already had the same problem.
I think it may have something to do with server-client lag? I found a way around it with rays but I would like to see this mystery solved.
Mine also dissappear befor hitting the target however when hitting a NPC or player they disspear early but the NPC or player gets hurt. I am inclined to think it could be a server client lag problem
hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - Damage, minus damage I'm assuming means without damage so, if your characters health is on 100% then it's gonna destroy.