I'm trying to make a FE compatible game. However, I've encountered an error when trying to listen for OnServerInvoke, inside of a server script. Here's the error:

OnServerInvoke is a callback member of RemoteFunction; you can only set the callback value, get is not available

Here's the code, in the Server Script:

if mouseTargetChanged ~= nil then
	mouseTargetChanged.OnServerInvoke:connect(function(plr, targetObject)
		return 0 -- for now
	end)
end

Here's the code, inside the Client Script:

if mouseTargetChanged ~= nil then
	mouse.Changed:connect(function(value)
		if mouse.Target == nil then return end
		if mouse.Target.Name ~= currentTargetName then
			currentTargetName = mouse.Target.Name
			mouseTargetChanged:InvokeServer(mouse.Target)
		end
	end)
end

Any help would be greatly appreciated.