I have been getting this error with a RemoteFunction, I am sending back a table of Player Usernames when It gets called for a ServerInvoke on my Client.
OnServerInvoke is a callback member of RemoteFunction; you can only set the callback value, get is not available
This is an example of my code:
Server:
local WinnerTable = game:GetService("ReplicatedStorage"):WaitForChild("QEvents"):WaitForChild("Winner"):WaitForChild("WinnerTable")
local winners = {"Roblox"}
WinnerTable.OnServerInvoke:Connect(function()
return winners
end)
Client:
local WinnerTable = game:GetService("ReplicatedStorage"):WaitForChild("QEvents"):WaitForChild("Winner"):WaitForChild("WinnerTable")
local winners = WinnerTable:InvokeServer()
for i,v in ipairs(winners) do
winners = winners + 1
end

3 comments
I'm pretty sure you're not supposed to call back the table that way. you should do return table at the end of your serverscript. It's just like how you would return certain values in a function
Can you give an example as an answer in a codeblock?
OnServerInvoke and OnClientInvoke are callback functions, not events, so they can't be connected. you simply set them.