I'm currently working on custom bulletholes, but whenever I test it the part is only facing forward it never faces the intended direction. I don't know exactly why this is happening. I've looked at every question on the site involving bulletholes only one has helped me so far but it is the main cause of my problem. I don't really understand how cframes work and they have always given me a headache to work with. Can somebody please help me?
Script
Evt.HitEffect.OnServerEvent:Connect(function(Player, Position, HitPart, Normal, Material, Settings)
if HitPart.Parent:FindFirstChild("Humanoid") then
print("Player Hit.")
else
local BulletPart = Instance.new("Part", HitPart)
BulletPart.Name = "BulletHole"
BulletPart.Transparency = 1
BulletPart.CanCollide = false
BulletPart.Size = Vector3.new(0.1, .5, .5)
BulletPart.CFrame = CFrame.new(Position)*CFrame.Angles(math.rad(Normal.X),math.rad(Normal.Y),math.rad(Normal.Z))*CFrame.Angles(0,math.rad(180),0) -- line in question
local BulletImage = Instance.new("Decal", BulletPart)
BulletImage.Texture = "rbxassetid://114148608"
BulletImage.Face = Enum.NormalId.Left
local BulletWeld = Instance.new("WeldConstraint", BulletPart)
BulletWeld.Name = "BulletWeld"
BulletWeld.Part0 = BulletPart
BulletWeld.Part1 = HitPart
game.Debris:AddItem(BulletPart, math.huge)
end
Evt.HitEffect:FireAllClients(Player, Position, HitPart, Normal, Material, Settings)
end)
If you would like to resolve this over discord
My Discord user is "VincenttheBaguette1#1253"
