Don't know how to use FastCast hit detection and getting rid of projectile after touching parts

Hello! I want to find out why my humanoid takes damage from itself while trying to get rid of the “Bullet” part after it touches any part other than humanoid

  • This is from a projectile script
  • I’m new to the FastCast thing
				local hit = result.Instance
				local character = hit.Parent
				if hit ~= nil and hit.Parent ~= nil then
					local humanoid = hit.Parent:FindFirstChildOfClass("Humanoid")
					if humanoid then
						humanoid:TakeDamage(10) -- Damage.
						bullet:Destroy()
					end
					game:GetService("Debris"):AddItem(bullet, 2)
				end
			end)```
1 Like

I would really recommend watching this video here:

1 Like

Somehow this made me retrace my steps into why the thing wasn’t working, I now know why.

Thanks a lot!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.