Need Help Making Collision with Ground Work Correctly

And actually, you took that out of context! You omitted the last few lines that ended the block properly:

begin
  inherited;
  { This virtual method is executed every frame (many times per second). }
  SandyIdling := 0;
  SandyAirborne := 0;
  MaxDistance := 0.3;
  MoveAmount := Vector3(0, -5, 0);
  RayCastDirection := Vector3(0, -1, 0);
  RayCastResult := AvatarRigidBody.PhysicsRayCast(
  (AvatarTransform.Translation),
  RayCastDirection,
  0.3
  );
  if RayCastResult.Hit then
  begin
  SandyAirborne := 0;
  LabelFps.Caption := 'FPS: PLACEHOLDER';
      if SandyIdling = 0 then
      begin
  SandyIdling := 1;
  SandyLegs.PlayAnimation('LEGS_IDLE', true);
  SandyTorso.PlayAnimation('TORSO_IDLE', true);
      end
  else
  SandyIdling := 0;
  begin
    if SandyAirborne = 0 then
    begin
  SandyAirborne := 1;
  SandyTorso.PlayAnimation('TORSO_AIRBORNE', true);
  SandyLegs.PlayAnimation('LEGS_AIRBORNE', true);
    end;
  AvatarTransform.Move(MoveAmount, false, true);
  LabelFps.Caption := 'FPS: ' + Container.Fps.ToString
  end;
  // UpdateAimAvatar;
end;

And how the heck am I wrong about the lines after the code not affecting the code in any way, if I know 100% that I didn’t change the code after that one line and it worked fine earlier?

I thought that’s a basic technique of programming and troubleshooting for any language, a skill you suggest I lack?

It’s like saying that if a wire snaps in a circuit with many wires, then there is something wrong with the wires that didn’t snap and I should fix every last one, instead of only the wire I know is wrong, while there’s not actually reason to do that?