Basic Admin Essentials Plugin Help

Hey there, I have been trying to make a PTS (Permission to Speak) command within Basic Admin Essentials that would notify Moderators+ and if they click the notification it would teleport them to user that said !PTS.
The issue is that Plugin is spotlighted on red, meaning something is wrong and I cannot find what is it. I am pretty sure it’s something with TeleportService, though I am unsure what it is.
I tried to fix and failed
I have tried everything that I could, help would be appreciated.

Plugin
local Plugin = function(...)
	local Data = {...}

	-- 
	local remoteEvent = Data[1][1]
	local remoteFunction = Data[1][2]
	local returnPermissions = Data[1][3]
	local Commands = Data[1][4]
	local Prefix = Data[1][5]
	local actionPrefix = Data[1][6]
	local returnPlayers = Data[1][7]
	local cleanData = Data[1][8] 

	--
	local pluginName = 'PTS'
	local pluginPrefix = actionPrefix
	local pluginLevel = 0
	local pluginUsage = "" -- leave blank if the command has no arguments
	local pluginDescription = "Calls for an in-game admin"

	-- 
	local teleportService = game:GetService('TeleportService')
	local Funcs = {}
	local tostring,tonumber = tostring,tonumber
	
	function Funcs.Teleport(Args)
		local Player = Args[1]
		local playerRoot = Player.Character:FindFirstChild('HumanoidRootPart')
			local Players = Player.Name if not Players then return end
			for a,b in pairs(Players) do
				if b.Character:FindFirstChild('HumanoidRootPart') then
					playerRoot.CFrame = (b.Character.HumanoidRootPart.CFrame*CFrame.Angles(0,math.rad(90/#Players*a),0)*CFrame.new(5+.2*#Players,0,0))*CFrame.Angles(0,math.rad(90),0)
				end
			end
			--
			
	local function pluginFunction(Args) -- keep the name of the function as "pluginFunction"
		local Player = Args[1]
		for i,v in pairs(game.Players:GetChildren()) do
			if returnPermissions(v) >= 1 then
						remoteEvent:FireClient(v,"Notif",Player.Name.." asked for help", 'Koui',{returnPlayers})
			end	
		end

	end

	-- 
	local descToReturn
	if pluginUsage ~= "" then
		descToReturn = pluginPrefix..pluginName..' '..pluginUsage..'\n'..pluginDescription
	else
		descToReturn = pluginPrefix..pluginName..'\n'..pluginDescription
	end

	return pluginName,pluginFunction,pluginLevel,pluginPrefix,{pluginName,pluginUsage,pluginDescription}
end

return Plugin```

Thanks, if so!

2 Likes

You didn’t return the teleport function to the main module