Touched event firing without part being touched

Every few seconds a new part is created and when the part gets touched via a touch event it damages the player. Sometimes the touch event triggers without the player touching the part.


This is the code:

local bulletPart = Instance.new("Part")
		bulletPart.Parent = workspace
		debris:AddItem(bulletPart, 0.1)

		local distance = (target - bulletPos).Magnitude
		bulletPart.Size = Vector3.new(0.1, 0.1, distance)
		bulletPart.CFrame = CFrame.new(target, bulletPos) * CFrame.new(0, 0, -distance/2)

		bulletPart.Anchored = false
		bulletPart.CanCollide = false
		bulletPart.Transparency = 0
		bulletPart.Material = Enum.Material.Neon

		bulletPart.Touched:Once(function(otherPart)
			if otherPart.Parent:FindFirstChild("Humanoid") and otherPart.Parent ~= self.enemyModel then

				damageTarget(otherPart, otherPart.Parent.Humanoid, self.damage)
			end
		end)

Hello. Is this on server or client? also Using .Touched event for bullets is not the way to go as you can see… it can be very buggy and overall not the best option. I believe Raycasts would be better to use but it is used for guns with non-visible bullets, so i don’t know if you can use it in this case.

It’s being handled by the server

You could try to test on the client and at the same time look on the server if there is latency between client and server… If so you should make this client side