Call function every time the player gets 5 points

I’m making a platform game. I want a special platform to be spawned every time the player increases his score by 5 (score = 5 - spawn special platform, score = 10 - spawn it again, spawn score = 15 - spawn it again… etc…)

I made the spawning script, it works fine, I just can’t think of the logic to create the mentioned above. Is it supposed to be a loop? Should I call it in Update()?

When you are updating your score.
Check for this condition

if(score >0 & score % 5 == 0 ){

and call your function.