That error is because you’re trying to move the root viewport. When you write:
var Player = get_parent().get_node(".")
You’re getting the parent node - and then get_node(".") does nothing but still get the parent node. "." means yourself.
It seems this script is looking for the Player node. You haven’t shown your node setup, so I can’t tell you the correct path, but that is what you need to use.
For example, if the player is a sibling of this one, you might use