How do I make a bullet spread for this raycast shotgun im making?

if gunType == “Shotgun” then
Handle.ShotSound:Play()

	local Beam = Instance.new("Part", workspace)
	Beam.BrickColor = BrickColor.new("White")
	Beam.FormFactor = "Custom"
	Beam.Transparency = 0.25
	Beam.Material = "Neon"
	Beam.Anchored = true
	Beam.CanCollide = false
	
	local Distance = (FirePart.Position - Target).magnitude
	Beam.Size = Vector3.new(0.1,0.1,Distance)
	Beam.CFrame = CFrame.new(FirePart.Position, Target)* CFrame.new(0,0, -Distance/2)

	game.Debris:AddItem(Beam, 0.1)

	local NewRay = RaycastParams.new()
	local RayDirection = (Target - FirePart.Position) * Range

	NewRay.FilterDescendantsInstances = {Player.Character}

	local Result = workspace:Raycast(FirePart.Position, RayDirection, NewRay)

	if Result then
		if Result.Instance then
			if Result.Instance.Parent:FindFirstChild("Humanoid") then
				Result.Instance.Parent.Humanoid.Health -= UziDamage
			end
		end
	end
end

This is what I have so it make the raycast bullet but i need to make it spread.

To make it spread you could change:

local Result = workspace:Raycast(FirePart.Position, RayDirection, NewRay)

To

local Result = workspace:Raycast(FirePart.Position, Vector3.new(RayDirection.X + math.random(-1, 1), RayDirection.Y + math.random(-1, 1), RayDirection.Z + math.random(-1, 1)), NewRay)

Would I also need more bullets to make it work?

And it didn’t work is there anything else im missing?