Burst Part Mode thing

So I want to make this FAMAS’s firemode burst, but looping the bullet and changing the spread won’t work. So I tried to make the bullet look like a spray of burst fired bullets. It will fire once, but the bullet won’t show and won’t damage. Help?

-- edited code
local function CreateBullet(bulletPos)
	wait(0.04)
	local bullet = game.ReplicatedStorage.Bullets.Burst
	bullet.FormFactor = Enum.FormFactor.Custom
	bullet.Size = Vector3.new(0.1, 0.1, 0.1)
	bullet.BrickColor = BrickColor.new("Black")
	bullet.Shape = Enum.PartType.Block
	bullet.CanCollide = false
	bullet.CFrame = CFrame.new(bulletPos)
	bullet.Anchored = true
	bullet.TopSurface = Enum.SurfaceType.Smooth
	bullet.BottomSurface = Enum.SurfaceType.Smooth
	bullet.Name = 'Bullet'
	DebrisService:AddItem(bullet, 3)
	return bullet
end

original code:

local function CreateBullet(bulletPos)
	wait(0.04)
	local bullet = Instance.new('Part', Workspace)
	bullet.FormFactor = Enum.FormFactor.Custom
	bullet.Size = Vector3.new(0.1, 0.1, 0.1)
	bullet.BrickColor = BrickColor.new("Black")
	bullet.Shape = Enum.PartType.Block
	bullet.CanCollide = false
	bullet.CFrame = CFrame.new(bulletPos)
	bullet.Anchored = true
	bullet.TopSurface = Enum.SurfaceType.Smooth
	bullet.BottomSurface = Enum.SurfaceType.Smooth
	bullet.Name = 'Bullet'
	DebrisService:AddItem(bullet, 3)
	return bullet
end

You never cloned the bullet, which is only firing once oof

Try changing that to

local bullet = game.ReplicatedStorage.Bullets.Burst:Clone()
bullet.Parent = workspace

still doesn’t work.

	bullet.Parent = workspace
	bullet.FormFactor = Enum.FormFactor.Custom
	bullet.Size = Vector3.new(0.1, 0.1, 0.1)
	bullet.BrickColor = BrickColor.new("Black")
	bullet.Shape = Enum.PartType.Block
	bullet.CanCollide = false
	bullet.CFrame = CFrame.new(bulletPos)
	bullet.Anchored = true
	bullet.TopSurface = Enum.SurfaceType.Smooth
	bullet.BottomSurface = Enum.SurfaceType.Smooth
	bullet.Name = 'Bullet'
	DebrisService:AddItem(bullet, 3)
	return bullet
end

How exactly are you looping the bullets? Is it with a for, while, or repeat loop?

uhh i don’t know. I guess this?

if hitObject then
					bullet = CreateBullet(bulletPos)

Is it with a Raycast or something

Maybe you could add the event that’s supposed to fire the bullet?

i think its a raycast

function RayCast(startPos, vec, rayLength)
	local hitObject, hitPos = game.Workspace:FindPartOnRay(Ray.new(startPos + (vec * .01), vec * rayLength), Handle)
	if hitObject and hitPos then
		local distance = rayLength - (hitPos - startPos).magnitude
		if RayIgnoreCheck(hitObject, hitPos) and distance > 0 then
			-- there is a chance here for potential infinite recursion
			return RayCast(hitPos, vec, distance)
		end
	end
	return hitObject, hitPos
end