Well, it revolves around what you’re doing. If you’re just changing info on the other end, then RemoteFunctions aren’t needed
One example I can think of is my admin system. I keep certain information stored on the server for security reasons, but of course, admin clients are going to need to access that information to work and display things. So, I set up a RemoteFunction that checks if the client requesting info is an admin, then I return the info to the client, otherwise, I just return nil.
This allows the client to access the info without bad actors also having access to it since their clients will never see it
I didn’t really respond to the original topic. It’s not weird because you can effectively get the same effect by firing the other context (server / client) on the same event.
Not necessarily, if you need to pass through tables, or values you only want the server to create and edit then you would want to use RemoteFunctions, not everything can be done by a RemoteEvent, a lot can be, but if you need to yield for the server to complete you’d need to use that.
It’s actually quite concerning that you’re not really using RemoteFunctions, because there are plenty of things on the server that it’s source shouldn’t be replicated on the client, but the client may need access to a copy. By you’re I’m just speaking to anyone who doesn’t see why to use remote functions
THOUGH, DO NOT USE REMOTE FUNCTIONS IF YOU DON’T NEED TO that’s just bad practice, but RemoteFunctions provide substantial use.
Synchronous - (It’s chron, meaning time), means that the code will run in order yes, serial. Line by line.
Asynchronous - Means not running at the same time/synchronization, essentially it’s a separate process that doesn’t run in synchronization with the rest of the script.
Concerning, here’s an example I have in place for my game.
My game has a management panel where users can rank others in a group, and manage other aspects of the game.
The UI is obviously managed by the client, however permissions should and must be handled on the server for security, and obviously you don’t want the client to have the source table that the server uses, so you’d use a RemoteEvent to invoke the server to send a copy of the permissions.
Then you can check permissions on the client, and then whenever you actually have the action go through, the server will check the permissions. (They should match up, if they don’t you can kick the client for editing the values.)
Synchronous just means in the same thread and asynchronous will run in a separate thread and usually won’t yield. Parallel is usually having multiple async threads in charge of doing some repeated actions at the same time. With parallel, you might have to deal with race conditions but async usually you don’t.
Parallel LuaU is roblox’s way of implementing multi-threading in a more optimized way for how LuaU functions. It simply adds more complexity, though allows for more synchronization and more performant and efficient asynchronous code.
Using tasks, coroutines and asynchronous functions are still parallel luau by definition. And they do the same thing, just in different ways with more or less optimization.
I do use them but only for things the client cant access. For example i have a button which gets all the players cash. And cash is only managed and created on the server. So i simply use them for only that.
< Also i use them for things like combat when the hitbox is handled on the client. But i use custom remote functions since if the client yields the thread the server will be waiting for a response and that could cause a memory leak.