The Nikon D5300 doesn't have an AF engine on the body and therefore will not autofocus the 50mm 1.8D lens.
I can't agree with Phillip that you "bought the wrong lens" insomuch that optically, it's a superior lens than most of the newer Nikkor 50mm out there; you simply have a bad pairing if autofocus is the primary goal.
Were it me (which, coincidentally I use a D5300 with a Nikkor 50mm 1.8D as my daily shooter pairing), I'd take the time to learn how to use a manual focus lens, ensure your diopter is adjusted correctly, and enjoy tack sharp images with a solid DoF that competes with full frame rigs. Alternatively, shoot in live view and get your focus on the LCD, but make sure you've got your aperture and shutter speed correct as the D5300 tends to auto balance everything on the back screen and you're not going to really know what you shit until after the shutter snaps (making it suboptimal for sports but....I think if you were are an sports event you'd be rocking something a bit tighter than a D5300, no?)
Of course when purchasing lenses, especially in the Nikon environment, ALWAYS research lens pairings prior to purchase. Nikon at least makes it dead simple to determine which lenses will work to what extent within its house brand. Great glass at the expense of their AF system is a but heavy handed when you want to explore or go legacy.