This is how Sideswipe's leg gets broken in The Great Autobot Caper.
Bumblebee: [hears hoofsteps] Everyone to their toy playing stations, Pumpkin Cake at 3:00!
[everyone freezes just as Pumpkin Cake enters the room]
Pumpkin: Hey, Sideswipe! Ready to go?
Mrs. Cake: Pumpkin Cake, it's nearly time to go.
Pumpkin: Okay, mom. Be there in a minute.
Mrs. Cake: You can play for a while if you want to. It's not until 7:00. [leaves]
Pumpkin: Not until 7:00, hmm.
[an hour later, Strongarm is tied up in rubber bands]
Strongarm: Oh, how I wish someone were here to save me. HELP!!
Bumblebee: Let her go, Megatron!
Megatron: Never, scout!
Bumblebee: If you gave me a choice on how she would die, I'll accept that!
Megatron: Well, how about these choices? My sword or my fushion cannon?
Bumblebee: I choose... [thinks for a moment] Sideswipe!
Megatron: What? That's not a choice!
Sideswipe: You're goin' down, Decepticreep! [takes out his sword]
Megatron: Die, Autobot! [fires his fushion cannon]
Sidswipe: Never! [jumps]
Megatron: You think that's all you've got? [transforms into his jet mode]
Sideswipe: Nope! [slices Megatron in half]
Megatron: NO!!!!!!! [dies]
Bumblebee: Great job, Sideswipe! [unties Strongarm]
Strongarm: Thanks for saving me, guys! [stands up]
Bumblebee: No problem, Strongarm!
Sideswipe: Go Team Bumblebee! [high fives Bumblebee]
[Suddenly, Sideswipe's leg breaks]
Pumpkin: Damm it!
Mrs. Cake: Is anything wrong, sweetie?
Pumpkin: Nothing's wrong, mom.
[Pound Cake comes in]
Pound Cake: Everything alright, sis?
Pumpkin: No. Sideswipe's leg's broken.
Pound: So I can see.
Pumpkind: I know.
Pound: Well, at least things can't get any worst.
Pumpkin: [sighs] Suppose they can't.
[the two leave the room and the toys come to life]
Bumblebee: Whoa, Sideswipe! What happened to your leg?
Sideswipe: What are you talkin' about?
Bumblebee: One of your legs is missing.
Sideswipe: What do you expect me to do? Look at my side?
Sideswipe: That's funny. Why would I want to look at my- [stops when he sees he's missing a leg] My leg!
Bumblebee: See? I told you.
Sideswipe: It feels like I'm like Olaf the Snowman.
Charlie: Good one, Sideswipe.
Sideswipe: Charlie, that's not funny!
Sideswipe: Great! First my sword goes missing and now my leg's broken. What else can go wrong? Me losing my head?
Nyx: I'm sorry about your leg, Sideswipe.
Sideswipe: It's okay, Nyx.
Skyla: Do you feel any pain?
Sideswipe: I don't think so.
Bumblebee: Well, at least you're okay.
Sideswipe: I know. But losing a leg is worst then losing my sword.
Applejack: Yer' gonna be okay, Sugarcube.
Sideswipe: I know, Applejack. I just hope my leg is easy to find.
Rainbow: I hope so too, Sides.
Sideswipe: I wonder where it could've gone.
Twilight: We'll help you find it.
Grimlock: But in the meantime, you stay there and rest.
Optimus: We will find your leg, Sideswipe. I am sure of it.
Thomas: Yeah. And fast. We've got to find it before Pumpkin Cake leaves.
Twilight: Yeah. Owlicious, can you see Sideswipe's leg from up there?
Owlicious: [looks around and then hoots]
James: Guess he can't.
Fixit: I think it's somewhere in this drawer.
Percy: Let's look harder.
Scootaloo: I hope we find it soon.
Sweetie Belle: Yeah.
[Bumblebee sees something red]
Bumblebee: What's that?
Starling: I think it could be Sideswipe's missing leg.
Eagle: Let's get it and see if it is.
[Bumblebee pulls the red something out but it turns to be a red ball]
Bumblebee: Oh, never mind. It's just Gummy's ball.
James: That's probably the something that Gummy was sniffing for when he was here. He lost his ball.
Thomas: Yes. Silly Gummy.
Applejack: Leavin' thangs wher' he fergets them.
Toby: Yeah. How silly is he?
[Everyone keeps searching for Sideswipe's missing leg]
Hawk: Hey. I think I found it.
Robyn: Really? Let's see.
[Everyone waits for Hawk to show what he has found]
Hawk: Oh. Never mind.
Eagle: We need to find it. Pumpkin will be back to pick up Sideswipe any minute.
Starling: I don't see how we can find it in this mess.
Rainbow: Hey. I think I see it.
[Everyone watches as Rainbow grabs what appears to be Sideswipe's leg]
Rainbow: Oh. Never mind. It's just a dumb sheet of paper. [throws it away]
Scootaloo: Sideswipe, when was the last time you had your leg?
Sideswipe: Around the time Pumpkin was playing with me, Bee, Strongarm, and Megatron.
Scootaloo: Right. So, it must've fallen under the desk somewhere.
Apple Bloom: Yeah. But wher'?
Sweetie Belle: How am I supposed to know?
Robyn: Well, wherever it went under this thing, we need to find out where.
Rainbow: I hope Applejack's pet dog can sniff it out.
Applejack: Oh, she will. Trust me, mah' dog can sniff out stuff better than anyone. Isn't that right, girl?
Applejack: You said it.
Fluttershy: I hope she can find it.
Henry: Me too, Fluttershy.
Ultra Magnus: We will find it.
Knock Out: But I just hope there's no interruption this time.
James: I'm sure there won't be any interruptions, Knock Out.
Knock Out: Okay. [quietly] Ya show off.
James: What did you say?
Knock Out: I didn't say anything.
James: Yes, you did. I heard you.
Knock Out: Alright, alright. I said you're a show off.
James: THAT'S IT! [pounces on Knock Out]
[The two start fighting and Sideswipe slaps his head]
Thomas: Sometimes, I wish those two would quit fighting.
Dusty Crophopper: Yeah. Besides, they share the same personality and like to keep their paintjobs clean.
Gordon: Also, they hate dirty jobs.
Rarity: But Pumpkin never puts me in dirty places. She keeps my mane perfectly neat.
Rainbow: Yeah. But I don't understand why James and Knock Out hate each other.
Applejack: Nor do Ah'.
Ratchet: It's because, when Knock Out joined the Autobots, He and James started calling each other weird names and that lead to them becoming rivals.
Sideswipe: Look, can we please get back to finding my leg?!
Thomas: Oops. Sorry, Sideswipe.
Percy: I just need to go somewhere private for a while.
Thomas: Okay. Just make you hurry back, Percy.
Percy: Okay. [walks off]
Spike: Where's he going?
Thomas: Somewhere to sit and think alone.
Percy: That's right. [leaves]
Applejack: Have ya' found it yet, girl?
Applejack: Well then, let's see it.
[But before everyone can see what Winona has found, Mrs. Cake comes up the stairs]
Thomas: [gasps] It's Mrs. Cake! Everyone freeze!
[they all stop in their tracks as Mrs. Cake comes in]
Mrs. Cake: Oh, my. Sideswipe, your leg is broken. Oh, well, looks like you're going on the shelf. [puts Sideswipe on the shelf]
[Mrs. Cake leaves the room and everyone unfreezes]
Thomas: Oh no!
Fixit: Sideswipe's been shelved.
Sideswipe: Aw, man!
Rainbow: Anyways, what were you gonna show us, girl?
Rainbow: Okay. Let's see it.
Applejack: Lead the way, girl.
[Everyone goes back to the desk as Sideswipe sits glummy on the shelf. However, James and Knock Out are still fighting down below]
James: I am gonna tear you apart! [punches Knock Out]
Knock Out: Go ahead and try! [kicks James]
Sideswipe: Hey! Will you two knock it off down there? I'm trying to get some sleep!
James: Oh. Sorry, Sideswipe.
Knock Out: Yeah. Sorry.
James: We'll get back to looking for your leg.
Sideswipe: Okay. [falls back to sleep]
[James and Knock Out leave to help the others as Sideswipe sleeps peacefully]
Applejack: Come on, Winona! You can sniff out things better than anypony.
Rainbow: It has to be somewhere in there.
Fluttershy: I think she found it!
Applejack: What did ya' find, girl?
Winona: [pulls out what she found and then whines]
Applejack: Never mind. It's just a pair of red shorts. [chucks them away]
Applejack: Nice try, girl.
Rainbow: How are we ever gonna find that bot's missing leg?
Thomas: [sighs] I don't know.
Fixit: Hey! What's keeping Percy?
Thomas: I don't know. He said he would be back soon.
Stephen: Yeah. But he's been gone for a long time.
Sweetie Belle: I'll go look for him.
Rarity: Okay, Sweetie Belle.
[Sweetie Belle leaves the room to look for Percy]
Knock Out: [steps on something hard] OW!!!
Knock Out: [hopping on one foot whie holding his other] I stepped on something hard! [hops around in circle shouting gibberish]
[James peeks down to see what Knock Out stepped on. And it turns out to be...]
James: Sideswipe's leg! You found it, Knock Out!
Knock Out: I did? I mean, I did!
Applejack: Nice goin', Knocks.
[James grabs Sideswipe's leg and races to tell Sideswipe]
James: Hey, Sideswipe! Wake up!
Sideswipe: What is it, James? [peeks down]
James: Look what Knock Out found! [shows his leg]
Sideswipe: My leg! Great work, Knock Out!
Knock Out: You're welcome! [starts to walk off but is pounced on by Winona and knocked over]
Sideswipe: [laughs] I guess Winona wants to congratulate you too!
Knock Out: [while being licked by Winona] Stop that! I'm going to rust!
Applejack: [laughs] But ya' told me that y'all wer' rust proof.
Knock Out: Yeah. But can you please tell her to get off me? Now?
Applejack: Winona, can ya' please get off Knock Out?
[Winona jumps down from Knock Out's belly]
Applejack: Sorry about that.
Knock Out: That's okay.
Sideswipe: How are you going to get my leg up to me?
James: I don't know.
Ari: I could take it up to him.
James: Thanks, Ari.
Ari: No problem. [takes Sideswipe's leg and flies up to the shelf] Here's your leg, Sideswipe.
Sideswipe: Thanks, Ari.
Ari: You're welcome! [flies off]
[Sideswipe, happy that he has his leg back, falls back to sleep]
Thomas: Who wants to play the Transformers video game with me?
Ari: I do! I do!
[The two take the game controllers and the word, "Start" appears on the TV]
Twilight: Thomas is always into games like that.
[In the basement, Sweetie Belle is looking for Percy]
Sweetie Belle: Percy, where are you?
[She suddenly hears someone sobbing]
Sweetie Belle: Percy? Is that you?
[Sweetie finds him sitting in a dark corner of the room]
Sweetie Belle: Percy? Why are you crying? Is everything alright?
Percy: No, Sweetie Belle! Everything is not alright!
Sweetie Belle: Why? What's up?
Percy: It's just that it hurts remembering the accident.
Sweetie Belle: What accident?
Percy: Well, many years ago, I had a father. He was killed during a big fire. That's the accident I'm talking about.
Sweetie Belle: Oh. I feel terribly sorry for you.
Percy: Thank you, Sweetie Belle. [hugs her]
Sweetie Belle: Well, let's get back to the others. They're probably wondering where we are.
Percy: Yeah. We should.
[They leave the basement]
[Back in Pumpkin Cake's room, Thomas and Ari have failed at the Transformers video game]
Thomas: Aw! Come on, we almost had him!
Ari: Ugh! This game is so hard!
James: Now you tell me.
Knock Out: Maybe the controllers aren't working right.
Thomas: Yeah. You're probably right, Knock Out.
[Percy and Sweetie Belle enter the room]
Thomas: Percy. You're back.
Fixit: Where were you?
Percy: I was in the basement.
Sweetie Belle: I found him there.
Percy: Did you find Sideswipe's missing leg?
Sweetie Belle: Where was it?
Robyn: It was under the desk.
Ari: So, if Pumpkin Cake's not here yet, how about a game of hide and seek?
Ten Cents: I'd love that.
Starling: Me too.
Eagle: Okay. You all go hide. I'll start counting. 1, 2, 3...
James: Psst. Thomas. Come under here.
[Eagle continues counting and Thomas joins James under the bed]
Ultra Magnus: He'll never find us down here.
Knock Out: He will if you don't stop talking.
Ultra Magnus: Okay. No more talking. I will not talk anymore. The talking is over.
Knock Out: You're still talking.
Ultra Magnus: Sssh. Not talking.
[Hawk hides behind a cactus plant as Eagle continues to count]
Hawk: This a good place to hi... [gets pricked on the nose by one of the cactus spines] Ouch!
[Arcee is hiding in a cuboard. She tries to keep the door closed but it keeps opening. She whistles to Gummy and he comes over]
Arcee: Gummy. I need something to block the door so it doesn't open.
[They spy a piece of wood]
Arcee: [gasp] That's perfect!
[Gummy goes over the piece of wood and picks it up, revealing Starling]
[Starling sees some paint cans and she quickly hides]
[Fixit franticly searches for a hiding place]
Fixit: It has to be a spot where I can't easily be seen.
[Fixit spies an empty cardboard box nearby and hides in it, closing the flaps and taping them shut]
Eagle: Ninety eight, Ninety Nine, One Hundred. Ready or not! Here I come!
[Eagle starts to look for the others]
Eagle: Now, where could they be hiding?
[He suddenly hears soft giggling]
Eagle: Ah-ha! I see you Thomas and James!
Thomas: You just found us because you saw our wheels.
Eagle: I also heard you giggling.
James: Ugh! Whatever!
[Eagle then hears a rattle]
Eagle: I know that's you Starling.
[Starling comes out]
Starling: Hey! That's not fair!
Eagle: I heard the paint cans rattling.
James: Guys, cut it out!
[Eagle and Starling sigh]
Eagle: Now to find the others.
[Eagle looks around]
Hawk: [gets pricked again] Ouch!
[Eagle hears and goes over]
Eagle: [taps on the pot] Hi, Hawk!
Hawk: [comes out covered in cactus spines] Oh, hey, Eagle.
[Eagle continues to look for the others]
Sweetie Belle: [giggling]
Eagle: I can see you, Sweetie Belle.
Sweetie Belle: How did you find me?
Eagle: [grabs her tail and gently tugs it] Your tail gave you away.
Sweetie Belle: Stupid tail.
[Eagle goes over to the cupboard and removes the peace of wood. The door swings open revealing Arcee]
Arcee: You found me, Eagle.
Eagle: Of course, I did!
[Eagle looks for the others]
Raven: [floats by]
Eagle: I see you, Raven.
Raven: Oh, great. I'm not a very good hider, am I?
Eagle: No. You're not.
Raven: Ha ha, very funny.
Eagle: I can hear you, Strongarm.
Strongarm: Aw, man.
Eagle: Sorry. Your wings gave you away.
Strongarm: Damm it.
Eagle: I can't believe I'm so good at this.
[Eagle continues his search for the others]
Eagle: I can hear you, Blaze!
Blaze: Aw, man!