Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

What is the point of doing onserverevent:connect(function(...)?

I've seen people doing this a lot, and I don't see the point. What is the point of it?

1 comment

0

so when a remote event triggers you can use it in a server script to know when it fires

1 answer

✓ Accepted answer

Basically, things that the server changes can be seen by all clients. But if a client changes something it'll only work for them. In some cases, you want the server to do something when something happens on the client, to accomplish this we can use RemoteEvents. This lets a client fire a function which the server can detect and read.

I'd suggest reading this article regarding the Client-Server Model, it goes quite in-depth when it comes to your question. If you have any further questions you can just comment on this post.

This discussion is preserved as it was. New answers, comments, and votes are closed.