Function mixing args?!

Hello there!
I’m experiencing a very weird problem: I’m using a remote event to call a server-side function. This function has three args.

Since the server script didn’t work, I printed the three args, and with my surprise the args were mixed!

Client Script:
game.ReplicatedStorage.ServerClient_Requests.ClientSideRequest:FireServer("KickPlayer", game.Players.alefa03, "Hello There!")

Server Script:

game.ReplicatedStorage.ServerClient_Requests.ClientSideRequest.OnServerEvent:Connect(function(Request, Player, Value)
   	print(Request, Player, Value)
end)

The Output:
alefa03 KickPlayer alefa03

I really don’t get how’s this possible. Am I doing something wrong or it’s just a weird bug? (It’s not the first time that this happens to me)
Thanks in advance for your help.

The first parameter of the .OnServerEvent event is always the player who fired the remote.

So that’d look like:

game.ReplicatedStorage.ServerClient_Requests.ClientSideRequest.OnServerEvent:Connect(function(playerWhoFired, Request, Player, Value)
   	print(Request, Player, Value)
end)
1 Like

Thank you so much! Now everything is finally clear.

1 Like