Untitled

Anonymous
plain_text
02/11/2026 2:08 PM
884 B
10
Indexable
local bulletPool = ObjectPool.CreateInstancePool(
    BulletTemplate,
    100,          -- minSize (nil olabilir)
    500,          -- maxSize (nil olabilir)
    true,         -- autoExpand (nil olabilir)
    25,           -- growthStep (nil olabilir)
    {
        parent = BulletsFolder,  -- opsiyonel ekstra ayarlar
        -- reset = function(b) ... end,
        -- destroy = function(b) ... end,
    }
)

local function fireBullet(origin: CFrame, velocity: Vector3)
    bulletPool:Spawn(function(bullet: Part)
        bullet.CFrame = origin
        bullet.AssemblyLinearVelocity = velocity
        bullet.CanCollide = false
    end, 2)
end
Editor is loading...
Leave a Comment