Log in to vote

Trying to use BindableFunctions to return a dictionary, not working?

Asked by 6 months ago

I'm trying to use a BindableFunction to return a dictionary full of all items, but the script stops running at "script.GetItems.OnInvoke:Connect(function()" and will not return anything.

Attempting to Fire() this BindableFunction will result in the script refusing to run any further.

My code:

local items = {

    [1] = {
        Name = "Copper Shortsword",
        Description = "A rough shortsword made out of copper. Seems rough but fairly lightweight and easy to swing.",
        Icon = "rbxassetid://1589011700",
        Rarity = "Common",
        Stackable = false,
        Armour = nil,
        Weapon = game.ReplicatedStorage.CopperShortsword


    return items
OnInvoke is a callback. incapaz 6404 — 6mo

Answer this question