How to spawn UI effect a XY position for the viewport

Hello. I’m trying to find out how to make UI effects or on-screen effects spawn at a specific location. Something like a cursor click at X=2 and Y=5 and spawn a gunshot effect on the Viewport at those coordinates.
As of right now I’m not sure if small UI Effects can work on the Viewport.