How to make teleporting SWEP in GMod?

So… How to make SWEP that teleports you to place where you aim?

Using self.Owner:SetPos(self.Owner:GetEyeTrace().HitPos)

I made a very simple tool for it ages ago (although this isn’t a SWEP)-

TOOL.Category = "Poser"
TOOL.Name = "#Teleporter"
TOOL.Command = nil
TOOL.ConfigName = ''

if CLIENT then

language.Add("", "Teleporting Tool")
language.Add("tool.stupidteleporter.desc", "Teleports yourself")
language.Add("tool.stupidteleporter.0", "Left click to teleport. Right click does nothing.")


function TOOL:LeftClick( trace )
	return true

function TOOL:RightClick( trace )
	return false

Note you might get stuck in walls and stuff since all it does is set a position without checking anything. It goes in ‘lua\weapons\gmod_tool\stools’