I got a question for you: Six years later, Troy has died of a heart attack, and Cory, now a USMC corporal, returns home, but informs Rose he will not attend the funeral. Rose admits to loving Troy despite his many flaws and pleads that Troy is still a part of him, and Cory later reconsiders after interacting with Raynell. Lyons is serving three years in prison for fraud, and gets furlough to attend the funeral. Similarly, Gabriel is released from the hospital to attend and reunites with his family as they all bid farewell to Troy. Gabriel prays for St. Peter to open the gates of heaven for Troy, and the sun glistens over them.

Answer this question: in the movie fences how did troy die?
Let's think first:
To answer the above question, the relevant sentence is: Six years later, Troy has died of a heart attack, and Cory, now a USMC corporal, returns home, but informs Rose he will not attend the funeral.
Therefore, the answer is a heart attack.