Problem With RemoteFunction Arguments

I’m having a problem with RemoteFunctions anytime I pass an argument not similar to the Player let’s say I wanted to get Limb Health since i’m making a Gore System the second argument is suppose to be the previous Limb Health but when I print it just prints the player does anyone know why it does this and how I can fix this?

Capture

Capture

Even removing the Player Argument doesn’t seem to work.

Can you show your client-side script, where you invoke the server?

Yes. Absolutely this problem is really annoying for me!

When the client invokes the server, you do not need to put the player in the parameters of invokeserver.

2 Likes


(Removed the player argument after I commented this but didn’t work)

Did that swiftly still prints the player.

Yeah, what @MaxximusPower said is correct. The player parameter is implied on the server, therefore, you do not need to put the player argument on the InvokeServer call. You should keep the player parameter on the server though. When you fire an InvokeServer call from the client, the first parameter for the OnServerInvoke event is ALWAYS the player who invoked the server. You don’t need to pass in the player manually.

1 Like

THIS FIXED IT LOL! Thank you so much @xendatro and @MaxximusPower this can be really annoying and hard to fix!

1 Like

Did you keep the onserverinvoke the same? The invokeserver function automatically includes the player as the first function. Edit: u got it already.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.