When the client invoked a RemoteFunction, the local script which invoked the RemoteFunction will yield until the server returns something. In your server script code, you didn’t return anything, so you should store the invocation of the remote event into a variable which will contain the returned value from the server.
Then most likely this if statement evaluated to false which doesn’t execute the code you posted previously. Please make sure this if statement is indeed evaluating to true to execute the code.
Then I have possibly no clue what’s wrong with your code. Either you try to use print statements to confirm that the invocation is working OR your remote function needs to be replaced.
Any chance you have multiple scripts/functions trying to handle the same .OnServerInvoke? RemoteFunctions can only have one function assigned to each callback (OnServer/OnClientInvoke)
Wow! Thank you so much! I found another script looking for invoked! Because one script is for money and the other for level. So when you finish the level you get that level and you get money! Sorry that was a bad mistake!