Best way to solve remote event problem?

So Im making a minecraft like game, and as u wud expect, it has block placing, block breaking. Rn i hav a custom made mouse input handler and i can get input with no issues. So heres my problem: Since both block placement and block breaking changes needs to b visible on all clients, iam using remoteevent to invoke code on server. However this requires two remoteevents for somewhat simple functions. So wts the best way to go about this

My Method:

Use 1 remote event and fire the server the required params along with a state, such as "break"or “place”.

But is the above method efficient?

P.S im not asking for full code just a reliable and effiecient way to do this.

A Dictionary will be the solution to manage 1 RemoteEvent that has multiple functions. You can search the dictionary to find the function for it according to the passed arguments.

1 Like