The $Path variable is not created and given a value in your script due to the path calculation being enclosed in /* comment brackets */. FileMaker does this for a calculation inside a script step when it is pasted if there is some error in that expression for the file into which you pasted it. You'll need to remove the comments and then correct what caused them to be added during the script paste.
I edited the Value to Value: "File:" & Get ( TemporaryPath ) & "Invoice.PDF" as i read, i think, on your older post. However, I still cant seem to get the PDF attached. I also do not want to save the PDF file to my computer I just want to create one and send it. The starter Solution works well.
BTW: Rookie at Filemaker and Programing
You have to save the file before you can attach it. Until you save the file, there is no file to attach after all. But by saving to Temporary Items, the file will not persist so that you don't have to do any "housekeeping" to keep a bunch of files from building up.
Once you have used $Path to save the PDF, you can open the dialog for Send Mail, click the attachment check box and enter $Path (no quotes) directly into the dialog that then opens. THis should then attach the PDF your Save As PDF step created to the email.