Help with shotgun spread!

Whenever I look to the x axis with my shotgun and shoot, the spread on the x axis is nonexistent no matter what, and its not the randomness of the spread factor. I know its something to do with CFraming but im not very good at CFraming yet so I need a little help. Does anyone know to make shotgun pellet spread that works consistently on the X axis?

local fctr = 25
local fctrY = 25
local xspread = math.random(-fctr,fctr)
local yspread = math.random(-fctrY,fctrY)
fire((gun.Hole.Position + gun.Hole.CFrame.lookVector * 100)+Vector3.new(xspread,yspread,0))
clientfire((gun.Hole.Position + gun.Hole.CFrame.lookVector * 100)+Vector3.new(xspread,yspread,0))

You could do

local pos = gun.Hole.CFrame:PointToWorldSpace(Vector3.new(xspread, yspread, -100))

That would give you a position 100 studs in front of gun.Hole, plus some jitter on the X and Y relative to the rotation of gun.Hole.

1 Like