removeEvent

API - unsubscribe to an event that you previously subscribed to.

Click Events for a list of available events.

🔫Events
--note this specific event has 2 parameters
function yourFunctionName(user, string_message)
    log(user.displayName .. ' has said ' .. string_message);
end
 
return function()
    
    --attaches the event to yourFunctionName()
    addEvent('chatMessage', 'yourFunctionName'); 
    wait(3);
    
    --unsubscribe your function from receiving events
    removeEvent('chatMessage'); 
    
    
    --make sure this script is kept alive so the event can be processed!
    keepAlive();
end
keepAliveRead ChataddEvent

Last updated