Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

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

Asked by 6 years 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
    }


}

script.GetItems.OnInvoke:Connect(function()
    return items
end)
0
OnInvoke is a callback. User#19524 175 — 6y

Answer this question