How do I make arrows stick to objects?

My arrow is pushed through the air with a body velocity.

I want to make a projectile stick to whatever object it hits. –What I want to achieve

I tried using .Touched for this, but it’d delay. I even tried to push it back a little after it hits something, but sometimes it’ll register it touching something right away, and make it spaced out. –Things I’ve tried

i think when it comes to Ranged weapons, the best solution would be creating some sort of system [WIth Raycasts] that (when you trigger) it will alert the server to create

[Point A] (from where you are trying to shoot)

and
[Point B] where the projectile will land

the position predict [Server-Side] is necessary, because exploiters can easily manipulate [Local scripts only] the position of where the arrow will land,

and you can add some functions depending on what [Point B] Destiny was

if Terrain -- something
if Npcs -- damage
if Players -- damager + effects or something
if the projectile was destroyed somehow -- just cancel , and don't trigger any function

Again, i recommend using Raycasts for this…
since it will make it even easy to manipulate projectiles, collisions and etc

ii have no time rn to show some script demonstration but this is it

1 Like

something like this?

while true do
    raycast stuff
    if raycast then stickToObject break end
    task.wait()
end

Edit: this will obviously be after I add a push force and stuff to the arrow

yes, something like that, raycast must check everything before any action is made, also raycast can create some sort of ‘‘HitBox’’

consider this: raycast == trails
since:
it will fade the hitbox slowly while the arrow is in mid-air, until the arrow hits Point B