diff --git a/shared/main.lua b/shared/main.lua index 77dc265..2863b35 100644 --- a/shared/main.lua +++ b/shared/main.lua @@ -70,12 +70,7 @@ end function QBShared.IsFunction(value) if type(value) == 'table' then - local success = pcall(function() - -- we just need to check if the table is indexable or not, this will simply return the error "cannot index a funcref" - return value.__cfx_functionReference - end) - - return success + return value.__cfx_functionReference ~= nil and type(value.__cfx_functionReference) == "string" end return type(value) == 'function'