ok that worked but now i'm getting another error:

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By OmriOn

ok that worked but now i’m getting another error: “Parser Error: Expected end of statement after expression, got Built-In Func instead.”

:bust_in_silhouette: Reply From: jgodfrey

Your error is in those last 2 lines.

position.x clamp(position.x, 0, screen_size.x)
position.y clamp(position.y, 0, screen_size.y)

You’re missing = signs there. So, this:

position.x = clamp(position.x, 0, screen_size.x)
position.y = clamp(position.y, 0, screen_size.y)

ohh my god thank you i was so dumb to not realize that

OmriOn | 2023-02-03 14:21