Getting error from BindableFunction?

Trying to make a function inside a PlayerAdded script that sends a table with a players data. It is a “Bindable Function”.

I get the error “OnInvoke is a callback member of BindableFunction; you can only set the callback value, get is not available”.

Does anyone know how to fix this?

game.ReplicatedStorage.Events.Functions.GetSave.OnInvoke:Connect(function(target)
	if target == plr then return data end
end)

OnInvoke is not an event. The exception messages clearly says you can only set, not get. In other words, you can only write to it (a = b) but not read from it (a)

function game.ReplicatedStorage.Events.Functions.GetSave.OnInvoke(target)
	if target == plr then return data end
end
4 Likes

Thanks!

Bindable.Invoke = function()

end