Problem Invoking Client With Remote Function!

Hello! I have a problem Invoking the Client (via the server). I’m not sure what this error code means, but here it is:
10:05:11.191 - OnClientInvoke is a callback member of RemoteFunction; you can only set the callback value, get is not available

Server Script:
local TimeFin = game.ReplicatedStorage.Remotes.GetTime:InvokeClient(plr)

Local Script:

game.ReplicatedStorage.Remotes.GetTime.OnClientInvoke:Connect(function()
    local timed = currentTime  --Sets up the return value
    stop = true  --a boolean for another function
    return timed --the return value
end)

Any help is appreciated!

You cant connect functions using RemoteFunctions, you have to set it to equal something like this

game.ReplicatedStorage.Remotes.GetTime.OnClientInvoke = function()
--Add stuff in here
end
1 Like