Applescript variable not being passed
You need to just add the variable to the end of your predetermined path string, like this…

set LastNameInitial to ""
repeat while LastNameInitial is ""
    display dialog "What is the first letter of your last name?" default answer ""
    set LastNameInitial to text returned of result
    if LastNameInitial is not "" then
        mount volume "smb://ServerName/files/myfiles/" &amp; LastNameInitial
    end if  
end repeat


I added a safety net just in case they don't enter an initial, which will keep springing the same dialog until they do, or cancel