|
| 20 Aug 2017 03:38 PM |
I know how to script with filtering enabled but the only thing i don't understand is the difference between remote events and function. If somebody could explain to me Why you would either use a remote event rather than a function or the other way around also what each remote thingy does different. If you could sum those up I would gladly appreciate it!
repeat print("Muffin is cool") until Muffin_is_way_too_cool == true |
|
|
| Report Abuse |
|
Ajastra
|
  |
| Joined: 01 Aug 2017 |
| Total Posts: 1461 |
|
|
| 20 Aug 2017 03:41 PM |
RemoteEvents do not yield and cannot be used to return a value, while RemoteFunctions do yield and can return a value.
Always use a RemoteEvent unless you need to use a RemoteFunction (which should be rare).
For example, say you need to get the client's screen resolution for some reason, which you shouldn't really need to do. You could use a RemoteFunction to return the resolution back to the server.
RemoteEvents are used for almost everything, such as purchasing an item from a shop or redeeming a Twitter code or sending the game state info to the client.
|
|
|
| Report Abuse |
|