How to prevent bullet holes from floating when target is moving

I made a bullet hole system for ACS and at the moment there are a few bugs such as the bullet holes floating when the target is moving. How can I fix this?

Example

image

Script
Evt.HitEffect.OnServerEvent:Connect(function(Player, Position, HitPart, Normal, Material, Settings)
	Evt.HitEffect:FireAllClients(Player, Position, HitPart, Normal, Material, Settings)


	local a = Instance.new("Part", BulletModel)
	a.FormFactor = "Custom"
	a.TopSurface = 0
	a.BottomSurface = 0
	a.Transparency = 1
	a.CanCollide = false
	a.Size = Vector3.new(0.5, 0, 0.5)
	a.CFrame = 	CFrame.new(Position,Position-Normal) * CFrame.Angles(90*math.pi/180,math.random(0,360)*math.pi/180,0)
	a.BrickColor = BrickColor.new("Really black")
	a.Material = Enum.Material.Air
	a.Name = "BulletHole"
	a.Parent = HitPart

	local b = Instance.new('WeldConstraint')
	b.Parent = a
	b.Part0 = a
	b.Part1 = HitPart

	local c = Instance.new("Decal", a)
	c.Texture = "rbxassetid://"..default_bulletholes[math.random(1,5)]
	c.Face = "Top"
	c.Transparency = 0.1

	local d = Instance.new("PointLight", a)
	d.Color = Color3.new(0, 0, 0)
	d.Range = 0
	d.Shadows = true

	local e = Instance.new("Weld")
	e.Part0 = a
	e.Part1 = HitPart

-- No end because below this point is irrelevant

Also if anyone has better bullet hole system that I could port to ACS that would be awesome.

The issue is that it uses the clients position value which changes between server and client.

Instead you should calculate the relative position from the hit part as the new origin that was obtained on the client using :ToObjectSpace and send that relative position vector instead.

A better way to visualize this to object space math is an attachment instance. Position this attachment on client, send over its CFrame and parent part to the server and use that to recreate it on the server.