Do remote functions HAVE to be written this way?

I’ve seen remote functions written this way, and specifically remember from a DevKing video he said it should be like this.

remote.OnServerInvoke = function()
    aefa
    EfRGFO
end)

But, he also said that remote EVENTS are scripting like this though.

remote.OnServerInvoke:Connect(function()
   kedsldk
   jcjsjsnnl
end)

Was he right? I’m really confused because I’ve seen other people do it the second way. Anything helps, thanks!

1 Like

Nope, you don’t connect to on server invoke or on client invoke, it’s a callback which you set. The other syntax is for remote events.

2 Likes