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

OnInvoke doesn't work with Bindable functions?

Asked by
Pixxels 45
9 years ago
InputService.InputBegan:connect(function(input)
for _, v in pairs(Settings:GetChildren()) do
if input.KeyCode == v.Value then
Functions:findFirstChild(v.Name):Invoke(script.Parent:findFirstChild(v.Name).Value)
end
end
end)

function Functions.PickUp.onInvoke(id)
print(id)
end

Error message: OnInvoke is not a valid member of BindableFunction

1 answer

Log in to vote
0
Answered by
jakedies 315 Trusted Moderation Voter Administrator Community Moderator
9 years ago

It should be OnInvoke, not onInvoke:

function Functions.PickUp.OnInvoke(id)
Ad

Answer this question