OnServerEvent will call the callback with Player as the first argument, so it’s unnecessary for you to pass the player.UserId.
Here’s a simple example on how OnServerEvent works using your code
RemoteEvent:FireServer(player.UserId, 1)
-- Will result in
RemoteEvent.OnServerEvent:Connect(function(Player: Player, UserId: number, RoleId: number)
end)
-- Or in a more simple way
RemoteEvent:FireServer(a, b, c, d)
-- Will result in
RemoteEvent.OnServerEvent:Connect(function(player, a, b, c, d)
end)
This is why the “attempt to concatenate Instance with string” happened, it’s because you are trying to combine Player with string
Here’s the correct implementation by the comment above.