Unexpected "Identifier" in class body error please help

“Unexpected ____ in class body” is a indentation error, which requires proper formatting to show in the forum

GDScript is white space sensitive meaning the tabs you add influence how the code runs. Including producing syntax errors if the computer cannot understand your indentation. I’m betting body.set_position($"../Marker2D".global_position) needs further indentation to be a part of the if statement above it.

Make sure to paste with three ticks ``` or a [code] block surrounding your code pastes