Trample works by requiring the attacking creature to assign at least "lethal damage" to each blocking creature before any excess can be assigned to the defending player (CR 702.19b). Lethal damage is defined as damage equal to the blocker's toughness, minus any damage already marked on it (CR 702.19c).
The critical point is that "lethal damage" for trample assignment purposes is based purely on toughness, not on whether the creature will actually be destroyed (CR 702.19c explicitly states this). Indestructible prevents destruction from damage (CR 702.12b), but it does not change the creature's toughness or the damage-assignment rules.
So if you attack with a 5/5 trample creature and it is blocked by a 2/2 indestructible creature, you must assign at least 2 damage to the blocker, and you may assign the remaining 3 damage directly to the defending player. The blocker survives due to indestructible, but the 3 trample damage still hits the player.
This same logic applies to creatures with regeneration shields or other damage-mitigation abilities — lethal damage for trample purposes is always calculated from toughness alone, regardless of what happens to the creature afterward (CR 702.19c).
Unofficial fan resource — not affiliated with or endorsed by Wizards of the Coast. Answers are AI-generated estimates grounded in the Comprehensive Rules and are not a substitute for an official judge. Verify anything match-critical.