Bullet hole rotating weird

Hello, i noticed my bullets from my… lets call it just gun, my gun bullet holes is actually placing weird, i tried looking for fixing methods but found only fastcast things, my bullet system using bodyforce and directions (Smth like ACS gunsys)


there’s bullet hole fragment:


	Bullet.Touched:Connect(function(hit)

		if (hit and (hit:IsA("Part") or hit:IsA("MeshPart") or hit:IsA("UnionOperation")) and 
			hit.CanCollide and hit.Material == Enum.Material.Concrete) then

			local BulletHole = game.ReplicatedStorage.FXgun.BulletHole:Clone()
			local impactPosition = Bullet.Position
			local impactNormal = (impactPosition - hit.Position).Unit -- rotation -- not works correctly

			BulletHole.CanCollide = false
			-- CFrame what weird works (rotation)
			local bulletHoleCFrame = CFrame.new(impactPosition, impactPosition + impactNormal)
			BulletHole.CFrame = bulletHoleCFrame

			BulletHole.Parent = workspace.GunDebris.BulletHole
			Debris:AddItem(BulletHole, 4)

			local newWeld = Instance.new("WeldConstraint") 
			newWeld.Part0 = hit
			newWeld.Part1 = BulletHole
			newWeld.Parent = BulletHole

			local hitSound = BulletHole:FindFirstChild("HitS") -- sound
			if hitSound then
				hitSound:Play()
			end

			-- effects
			BulletHole.Dirt:Emit(1)
			BulletHole.Smoke:Emit(3)
			BulletHole.Stone:Emit(2)

			-- destr bullet
			Bullet:Destroy()
			print("bullet ended")
		elseif hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") and not (hit.Parent == char) then
			print("HumanoidDMG")
			Bullet:Destroy()
		end

		-- firing createshell
		if CreateShell then
			CreateShell()
		else
			warn("CreateShell function is not defined!")
		end

	end)

Please just say me how to do it normal…
OMG IS THIS MINOS PRIME?

The bullet holes actually look like they’re all parallel which means they need to be rotated 90 degrees one way

Do trial and error by adding onto the bullet’s CFrame something like * CFrame.Angles(math.pi / 2, 0, 0) or CFrame.Angles(0, 0, -math.pi / 2) until you get the correct rotation

now when i shooting walls or smth bullet rotation is like on floor

I’m pretty sure raycasting is the way to do it better.
Touched events don’t give a ‘normal’ for the direction of the face they touch. They also have issues with fast moving or small projectiles not actually registering a hit on the Part they should be touching.

Raycasts do that, so you can align the bullet hole to that face’s oreintation.

1 Like

I already said what im using bullets like ACS, (not acs actually) Ill pin a picture how bullet working

I understand that,
What I’m saying is if the bullet hits a sloped surface or a vertical wall instead of the ground then the vertical orientation of the decal won’t match the surface that was hit. If the bullet hits a MeshPart or a Ball then it’ll probably be way off.

You may still need to shoot a raycast slightly ahead of the bullet to get the surface Normal of the item that’s being hit.