Parameters being passed over wrongly

When I send information to the server, but the local script and server script print out different values.

Local script:

local success = ChangeTeam:InvokeServer(player, Button.Parent.Name)

It supposed to pass over the player, and the parent’s name of a button. I tried printing the name, and it worked completely fine

Then I printed the value in the server script, but it didn’t print the string, but rather the player, and I have no idea why

CTRE.OnServerInvoke = function(player, targetstring)
	local playerteam =player.Team


Player instance is passed by the engine in each client → server remote already. Just edit the local script to avoid sending the player twice. :slight_smile:

1 Like

So I don’t have to pass over the player in such remote events? Thanks btw.!

1 Like

That’s right, and you can also trust that the remote signal is truly coming from that player. Np!

1 Like

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