Skip to content
This repository was archived by the owner on May 1, 2025. It is now read-only.

Latest commit

 

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Signal

Generated by Rojo 7.3.0.

Wally Installation

Signal = "ernisto/signal@0.2.0"

Usage

local function Inventory(player)
    
    local itemAdded = Signal.new()
    local items = {}
    
    itemAdded:connect(function(item)
        
        assert(player.level >= item.requiredLevel, `not enough level`)  -- cancel :addItem
    end)
    
    function self:tryAddItem(item)
        
        local success = itemAdded:_tryEmit(item)
        if not success then return false end
        
        table.insert(items, item)
        return true
    end
end

About

A light-weight BindableEvent wrapper

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages