Mistakes are valuable learning opportunities, yet in uncertain environments, whether a lack of reward is due to poor performance or bad luck can be hard to tell. To investigate how humans address this issue, we developed a visuomotor task where rewards depended on either skill or chance. Participants consistently displayed a self-attribution bias, crediting successes to their own ability while blaming failures on randomness, an effect that influenced their subsequent decisions. Computational modelling revealed two underlying mechanisms--a distorted perception of ability and a positivity bias in the skill condition. Notably, while distorted self-perception shaped behaviour, it did not affect confidence; instead, self-attribution bias led to overconfidence in external blame. These findings suggest a more complex picture in which self-attribution biases arise from both perceptual distortions and post-decision evaluations, highlighting the need for an interplay between experimental design and computational modelling to understand behavioural biases.