My friend and I have a projectile that is fired to the cursor location on a key press but when the orb passes through yourself it does not do damage to the enemy on the other side
Assuming quite heavily that your orb works a lot like the rocket launchers in Roblox, here's your fix. To let your "orb" pass through players, I recommend that you change the collision group and only allow the "enemy" collision group to be able to collide with the "orb."
Here's a link to a useful tutorial on using collision groups: https://www.robloxdev.com/api-reference/class/PhysicsService
Also, on the script side of things, I would recommend you to use an "if" statement to check whether it collided with a player or an enemy. Here's a sample:
orb = script.Parent orb.hit:Connect(function(WhateverItHit) if WhateverItHit:FindFirstChild("Humanoid") then --I guess you could leave this blank or set it to "if not WhateverItHit ... then..." and you will be able to not require to put in an elseif statement. elseif WhateverItHit:FindFirstChild("Enemy") then --The "Enemy" can just be the NPC "Humanoid" renamed to "Enemy". end end)
If you have any questions or issues, please contact me. ;)