How can I make these bullet holes work properly?

So I’m still new at scripting, so I used the code from a video but used a clone instead.
The issue is that the bullet holes face the camera instead of the surface, and I can create holes on holes, which is not good.

local script in starter player scripts

local player = game.Players.LocalPlayer
local mouse = player:GetMouse()

local bulletHole = game.ReplicatedStorage["bullet hole"]:Clone()
bulletHole.CFrame = mouse.Hit
bulletHole.Parent = workspace

You need to raycast and use the surface normal.

try to ignore bullethole through raycast params?

1 Like