Set max score

I have created a quiz game that tallies up the user’s score. The issue is that it goes above %100. It currently is setup if the user gets above %70 it states either pass or fail. I have tried a clamp but it’s not working properly. I have attached some images.

Can you provide more information? The logic in the provided screenshots seems good enough. Where in the process does it stop working properly? Have you checked what values are actually being compared in your final branch with the >70?

[…]I have tried a clamp but it’s not
working properly.

Clamping does not change the value of the clamped variable. If you want to apply the clamp, you need to update the variable as well. In your case the percentage is a part of a struct. You can update the struct by setting its member to the clamped value.

Thanks for the reply. Everything works correctly except the score goes over %100. I wasn’t sure if I should use a clamp, I just assumed that would be the way to go.