I’m wondering how SetNetworked(Datatype) and GetNetworked(Datatype) functions work.

I’m updating player stats every second with SetNetworked(Datatype) I was wondering how it works.

Case 1:
SetNetworked updates locally on the server and GetNetworked pulls when called on the client.

Case 2:
SetNetworked sends a one-time update packet to the clients.

I was thinking it’s one of those two cases. If it’s not please tell me.

Also, is this efficient and is there a better way to do this?