Portal Gun Issues... Help?

Again, I’m still learning, but how can I put a script (or blueprint) in the character that controls what happens when the projectiles collide and make them spawn portals?