Why do I receive every parameters as the player name when I do a remote event

Hello everyone, so I want to send a value with a remote event to the server but when ever I send it, I receive it has the player’s name. Help!

Here is my local script followed by my server script :

updateHair:FireServer(player, player.Hair.Value)

updateHair.OnServerEvent:Connect(function(player, value)
	print(value)
end)

Here is what it prints (my name) :

image

Thanks for any help.

2 Likes

Don’t pass in a player roblox does it automatically

2 Likes

Dont fire the player value, the server will automatically assign the first parameter to the player. In the server script the second parameter is actually the first argument you pass in FireServer.

Like the rest of the replies above said, dont pass player, just do this

updateHair:FireServer(player.Hair.Value)
1 Like

Oh ok, I did not know that. Thank you. to the three of you. @Intencidy, @domboss37 and @Vikram200526

2 Likes

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