This is the same script from before, just use Camera this script has that variable, you do not need Global.Player.Head
func interact_cast() -> void:
var camera = Camera # not Global.Player.Head
To get help faster and easier it would be helpful to also describe: what did you try? How is Global defined? And make sure to paste scripts with proper formatting