Multiline Text generates comments

Is there a way to generate process/task comments using multiline texts or text fields?
I’ve already tried to use the following script task:

var instanceId = execution.getProcessInstanceId();
var commentTest = execution.getVariable(“multilineComment”);
var taskId = execution.getVariable(“taskId”);
taskService.addComment(taskId, instanceId, commentTest);

(PS: My Multiline Text field value is multilineComment)

The code works but it does not generate any comment in task or process.