Help with stats

The local script that invokes the RemoteFunction should be anywhere that can actually run it. If you want it to be ran by the click of a button, you should put it in that gui. The server script should be in ServerScriptService.

Here is everywhere a local script can actually run

Im not seeing any local scripts that invokes

Well, that can be added later. Show me screenshot of the properties of the RemoteFunction

Here are the properties
image

And itā€™s still saying that ā€œOnServerInvokeā€ isnā€™t a valid member? That is strange.

Yeah im not to sure why, does it say it for you?

It does not, which is mostly why Iā€™m confused. It should work just fine for you. Can you show me that line of the script again?

I even wrote a whole local script to test if the RemoteFunction worked, and it did just fine. Iā€™m very confused.


Here is the line of code

Everything is spelled just fine, nothing is wrong. I donā€™t understand what is giving you the error.

Do this for me: comment out that line, and then drop another line. On that new line, add this code and show me what it prints:

print(events:WaitForChild("GetDataEvent"), events:WaitForChild("GetDataEvent").ClassName, events:WaitForChild("GetDataEvent").Parent)

It should print GetDataEvent RemoteFunction Events

It gives me that in the output

I think I might know what is wrong. Do you still have a RemoteEvent in that events folder called ā€œGetDataEventā€? In the output, it printed RemoteEvent and not RemoteFunction like it should have, which leads me to believe there might still be a RemoteEvent in there with the same name that it is picking before the RemoteFunction.

Yup that was exactly the problem

Delete that RemoteEvent if you still havenā€™t. That will fix it

It works, however I had a friend donate and it doubled the amount he donated?

Iā€™m a little confused, I apologize. English is not my first language. Expound please

So im not sure if its the leaderstat script, but in my game the ā€œraisedā€ and donated" are from stands shown below. My friend donated 3 robux but the leaderstat says he donated 6

Is there any other scripts that could be causing it? I can review my script again, but Iā€™m fairly sure it is working fine.

Yeah there are a lot of other scripts so im not sure

Just go through and review all of them. Take all the time you need. I reviewed my code, and unless I missed something, it is perfectly fine.

Iā€™m going to sleep soon, though. So Iā€™ll help out again when I get home from school tomorrow.

Alright thank you for the help but that should be all. Thank you so much!

1 Like