Calculate Formula for Rollupsum total likely amount of assigned user

I am trying to create a formula in the tasks module that calcultates the total likely amount in opportunities where the assigned user is the same in the task as it is in the opportunity.

Can anyone help as all I can do is get the total likely amount in any Opps that i relate to the task, but that's not helpful as all the Opps won;t be releated to the task?

rollupSum($opportunities,"amount")