CAST failed when using child of the CASTED parent character class

the Respawn function is in PlayerState

X which has a respawn function that is linked to the respawn function CALL in player state

Y doesnt have any code in it I was relying on inheritance giving Y the same stuff as X

i assumed that Y the Child character class would make the cast return True because its parent which is X is the class that the cast in the PlayerState is casting to

I was thinking of a possible solution which would be insted of casting the Respawn Function to The Character parent class i would cast it to ACharacter which is generic and would return successfull for all different Child character classes in game

would this be correct solution