I am trying to do bullet spread and I think ive got it almost done im just having problems with the bullets not going to where the mouse.hit is.
Heres my code right now and also a gif of whats happening.
local Direction = CFrame.new(Tool.Barrel.CFrame.Position, Mouse.Hit.Position) * CFrame.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)).LookVector local BulletRay = Ray.new(Tool.Barrel.CFrame.Position, Direction.Unit * 1000)
https://gyazo.com/907902b0b2e1b3e6a0969a335f69814d
Anyone have any ideas? Thank you for your time :)