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.