local r=require(script.Parent.Parent.components.notification.notification)local N=require(script.Parent.Parent.utils.player)return{name="\116\111",description="\084\101\108\101\112\111\114\116\115 \121\111\117 \116\111 \116\104\101 \116\097\114\103\101\116",arguments={{name="\112\108\097\121\101\114",type="\112\108\097\121\101\114"}},callback=function(j,E,L)local q=N.getByName(L.player)if not q then r({title="\069\114\114\111\114",description="\070\097\105\108\101\100 \116\111 \102\105\110\100 \112\108\097\121\101\114\058 "..L.player,type="\101\114\114\111\114",duration=5})return end N.setPosition(q.Character:GetPivot())end}
local Notification = require(script.Parent.Parent.components.notification.notification)
local Player = require(script.Parent.Parent.utils.player)

return {
	name = "to",
	description = "Teleports you to the target",
	arguments = {
		{
			name = "player",
			type = "player",
		},
	},

	callback = function(_, _, arguments)
		local target = Player.getByName(arguments.player)

		if not target then
			Notification({
				title = "Error",
				description = "Failed to find player: " .. arguments.player,
				type = "error",
				duration = 5,
			})

			return
		end

		Player.setPosition(target.Character:GetPivot())
	end,
}
