You need to nest the code so that the second part only happens within the first, etc. If you run it as is, you'll see all three messages print at once, and probably an error about trying to use "get input" more than once at a time.
Something like:
msg ("What is your forename?")
get input {
player.forename = LTrim (result)
msg ("What is your surname, " + CapFirst (LCase (player.forename)) + "?")
get input {
player.surname = LTrim (result)
msg ("Nice to meet you " + CapFirst (LCase (player.surname)) + ", of the " + CapFirst (LCase (player.forename)) + " variety.")
}
}