LOUISVILLE, Ky. - Shabazz Napier hit a 3-pointer with 3.5 seconds left to beat his former team as the Orlando Magic earned their first preseason win, 100-97 against the Miami Heat on Wednesday night.

Nikola Vucevic led the Magic with 17 points.

MAGIC: Elfrid Payton scored four points while limited to 20 minutes with foul trouble.

HEAT: Chris Bosh led all scorers with 18 points, 16 in the first half. He played 24 minutes in his second game back after missing the final 30 games last season because of blood clots in one of his lungs . Dwyane Wade missed time in the first half with a bent thumbnail but returned. . Hassan Whiteside did not play due to a calf strain.

ROOKIE WATCH: Lottery picks Mario Hezonja (Heat, 5th overall) and Justise Winslow (10th, Magic) each played more than 20 minutes. Hezonja scored eight points, hitting 2 of 5 3s, and Winslow scored five points and had four rebounds.

UP NEXT: Orlando visits Indiana on Friday. Miami hosts San Antonio on Oct. 12.