I feel like I should know how to do this, and I did get this working (unfortunately with negative side affects), so I was wondering if anyone had an approach they would suggest on how to make a character skid when moving a certain direction and then inputting the opposite of that direction? (like if Mario turns around while running)

It's a top-down 2D character, and I have the method to apply friction, I'm just looking for the right words to specify to apply friction when inputting the opposite direction the character is moving. Basically I'm trying to word the condition right.

This is what I came up with:
if velocity.x >0 and Input.is_action_pressed("ui_left") or velocity.x <0 and Input.is_action_pressed("ui_right"):
apply_friction(_delta)
if velocity.y >0 and Input.is_action_pressed("ui_up") or velocity.y <0 and Input.is_action_pressed("ui_down"):
apply_friction(_delta)

,but is there a better way I should or could word this? (Preferably shorter so I can declare "apply_friction()" once instead of twice.)

Anyway, I'm struggling with something I feel should be more simple, even for me, but I'm still a novice, so I thought I'd ask for help. Thank you.

You could shorten it slightly by combining the two if-statements into a single if-statement.

if A:
    X
if B:
    X

is equivalent to:

if (A) or (B):
    X

That's assuming that executing X twice is equivalent to executing it once.

The parentheses may not be needed.

    DaveTheCoder
    Would you say my if-statements make enough sense otherwise for what I want my character to do? Assuming "apply_friction(_delta)" works as intended. Which I guess I could share that code here.
    func apply_friction(_delta):
    velocity = velocity.move_toward(Vector2.ZERO, friction * _delta)

    I haven't used apply_friction before. If it's behaving the way you want, then it's probably correct.

    The online documentation search function is broken right now, so I can't use it for reference.

    Is apply_friction a custom method you wrote? I mistakenly thought it was a built-in method, which is why I thought the search function was broken.

    Sorry. Yes it is. (from a tutorial)

    "friction" is also a variable I have with an integer value.