place a weapon that fires a projectile with the setting "projectileEventType = 1" (i.e. files/gamecore/projectiletypes/fantasy/fireball/fireball.txt)
give it portal_gun.lua
place 2 decals to use as your portals near the gun, give them portal.lua (the script will automatically assign & hide these)
assign sound0 a looping sound when player is nearby
assign sound1 a sound that is played when teleporting the player
edit - 28/03/2019; adjusted rotation to better match the hit surface (thanks to amenmoses again
)
fixed the entity number error
*please redownload portal_gun.lua*
feel free to edit and improve as you wish