How to add bullet spread to a racyast gun?

I’m trying to add bullet spread to a raycast gun, but I don’t know how to.
I found some topics about adding bullet spread to raycasting guns, but I didn’t know how to add It to my gun.

Here Is the “raycasting” part

script.Parent.RayCastEvent.OnServerEvent:Connect(function(Player, FromP, ToP)
	local RayCast = Ray.new(FromP, (ToP-FromP).unit * 1000)
	local Part, Position, Normal = game.Workspace:FindPartOnRay(RayCast, Player.Character, false, true)

If you would like more Info on the gun, tell me.

2 Likes

I have the exact same problem. Looks like we have the same script too.