Hello. I was wondering how you can make the client wait for the function to finish on the server side when firing an event. I’m having remote event which the client fires. I wan’t to make the rest of the client code wait until the server has finished updating the players inventory stats so that the local script can continue its proccess with updated stats.
Make the client wait for server script to finish after firing a remoteEvent
A remote function sounds like exactly what you need.
You can find documentation on remote functions here: Remote Functions and Events (roblox.com)
Remote functions are summarised by:
RemoteFunctionis “invoked” when that client wants the server to do something and be notified when the server is done.
Hope that helps.