🏭GeneratorService

Example usage:

-- Create a TNT generator above newly placed Ceramic blocks
Events.BlockPlace(function(event)
    if (event.blockType ~= ItemType.BLASTPROOF_CERAMIC) then
        return
    end

    local gen = GeneratorService.createGenerator(ItemType.TNT, event.position)
    gen:setCooldown(4)
    gen:setMax(100)
end)

Functions

createGenerator(itemType: ItemType, position: Vector3): Generator

Creates a Generator at the given position that will drop the item on a cooldown.

Last updated