Need help BA Essentials[DON'T HANDLED]

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

	-- Included Functions and Info --
	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] -- cleanData(Sender,Receiver,Data)
	-- Practical example, for a gui specifically for a player, from another player
	-- cleanData(Sender,Receiver,"hi") -- You need receiver because it's being sent to everyone
	-- Or for a broadcast (something everyone sees, from one person, to nobody specific)
	-- cleanData(Sender,nil,"hi") -- Receiver is nil because it is a broadcast

	-- Plugin Configuration --
	local pluginName = 'Rules'
	local pluginPrefix = ""
	local pluginLevel = 1
	local pluginUsage = "" -- leave blank if the command has no arguments
	local pluginDescription = "Broadcast the rules."

	-- Example Plugin Function --
	local function pluginFunction(Args) -- keep the name of the function as "pluginFunction"
		local Player = Args[1]
		if Args[3] then
			local Victims = returnPlayers(Player, Args[3]) if not Victims then return end
			local combinedVictims = ''
			for a,b in pairs(Victims) do
				if combinedVictims == '' then
					combinedVictims = b.Name
				else
					combinedVictims = table.concat(Victims,", ")
				end
			end
			for a,b,c in next,Victims do
				remoteEvent:FireClient(b,'Message','Training Rules','Salutations! I am delighted to be your fantastic Host today. Shortly me and my co-host will say out the rules, so please pay attention.');
				wait(15)
				remoteEvent:FireClient(b,'Message','Training Rules','Hi! Welcome to this training. I Am Your Co-Host today. Please pay attention, as we will say out the rules.');
				wait(15)
				remoteEvent:FireClient(b,'Message','Training Rules','Rule I) Use grammar. Not using it will result in a warning worse ban from the training.');
				wait(15)
				remoteEvent:FireClient(b,'Message','Training Rules','Rule II) Always listen to your trainer. If you need to AFK during the training, please inform your trainer.');
				wait(15)
				remoteEvent:FireClient(b,'Message','Training Rules','Rule III) Cheating is prohibited! If we gonna catch you on cheating you will be dismissed from the training.');
				wait(15)
				remoteEvent:FireClient(b,'Message','Training Rules','Rule IV) If you fail, don’t feel discouraged, as there is always other time. Before the trainer will dismiss you, they will tell you the mistakes you made.');
				wait(15)
				remoteEvent:FireClient(b,'Message','Training Rules','Rule V) Never record training. Recording will result in demotion.');
				wait(15)
				remoteEvent:FireClient(b,'Message','Training Rules','Thank you for listening to our Co-Host. Now I will present the course of the training, so please pay attention.');
				wait(15)
				remoteEvent:FireClient(b,'Message','Training Rules','Firstly, a trainer will come and ask you to follow you. After that they are gonna tell you the basic info about training.');
				wait(15)
				remoteEvent:FireClient(b,'Message','Training Rules','Then they will move to the trolling section. A trainer will act like AA’er / Exploiter / Troller. You need to deal with them then.');
				wait(15)
				remoteEvent:FireClient(b,'Message','Training Rules','After that, if you pass the trolling section you are gonna need to answer questions in Quiz Section.');
				wait(15)
				remoteEvent:FireClient(b,'Message','Training Rules','Quiz Section have 4 questions and after passing it you gonna be ranked.');
				wait(13)
				remoteEvent:FireClient(Player,'PM',"Borispil Training Center",'Ready???',true)
				wait(10)
				remoteEvent:FireClient(b,'Message','Training Rules','Please be seated while our trainers will start claiming groups. If you have not been picked, go to co-host and ask for help.')
			end
		end
	end


	-- Return Everything to the MainModule --
	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

This line combinedVictims = table.concat(Victims,", ") is causing the issue, it says there is an invalid value.

Specifically, this table.concat(Victims,", "), looks like a typo, should it be: table.concat(Victims, "")?


If this fixes your problem, mark it as soloution!

Let me check!
Thanks. Wait please

Don’t work. Idk. oh.

I’m write “rules all” don’t work

Try remove this from the code, it’s causing some type of issue.

Doesn’t work. Ohhhhh

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

	-- Included Functions and Info --
	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] -- cleanData(Sender,Receiver,Data)
	-- Practical example, for a gui specifically for a player, from another player
	-- cleanData(Sender,Receiver,"hi") -- You need receiver because it's being sent to everyone
	-- Or for a broadcast (something everyone sees, from one person, to nobody specific)
	-- cleanData(Sender,nil,"hi") -- Receiver is nil because it is a broadcast

	-- Plugin Configuration --
	local pluginName = 'Rules'
	local pluginPrefix = ""
	local pluginLevel = 1
	local pluginUsage = "" -- leave blank if the command has no arguments
	local pluginDescription = "Broadcast the rules."

	-- Example Plugin Function --
	local function pluginFunction(Args) -- keep the name of the function as "pluginFunction"
		local Player = Args[1]
		if Args[3] then
			local Victims = returnPlayers(Player, Args[3]) if not Victims then return end
			local combinedVictims = ''
			for a,b in pairs(Victims) do
				if combinedVictims == '' then
					combinedVictims = b.Name
			end
			for a,b,c in next,Victims do
				remoteEvent:FireClient(b,'Message','Training Rules','Salutations! I am delighted to be your fantastic Host today. Shortly me and my co-host will say out the rules, so please pay attention.');
				wait(15)
				remoteEvent:FireClient(b,'Message','Training Rules','Hi! Welcome to this training. I Am Your Co-Host today. Please pay attention, as we will say out the rules.');
				wait(15)
				remoteEvent:FireClient(b,'Message','Training Rules','Rule I) Use grammar. Not using it will result in a warning worse ban from the training.');
				wait(15)
				remoteEvent:FireClient(b,'Message','Training Rules','Rule II) Always listen to your trainer. If you need to AFK during the training, please inform your trainer.');
				wait(15)
				remoteEvent:FireClient(b,'Message','Training Rules','Rule III) Cheating is prohibited! If we gonna catch you on cheating you will be dismissed from the training.');
				wait(15)
				remoteEvent:FireClient(b,'Message','Training Rules','Rule IV) If you fail, don’t feel discouraged, as there is always other time. Before the trainer will dismiss you, they will tell you the mistakes you made.');
				wait(15)
				remoteEvent:FireClient(b,'Message','Training Rules','Rule V) Never record training. Recording will result in demotion.');
				wait(15)
				remoteEvent:FireClient(b,'Message','Training Rules','Thank you for listening to our Co-Host. Now I will present the course of the training, so please pay attention.');
				wait(15)
				remoteEvent:FireClient(b,'Message','Training Rules','Firstly, a trainer will come and ask you to follow you. After that they are gonna tell you the basic info about training.');
				wait(15)
				remoteEvent:FireClient(b,'Message','Training Rules','Then they will move to the trolling section. A trainer will act like AA’er / Exploiter / Troller. You need to deal with them then.');
				wait(15)
				remoteEvent:FireClient(b,'Message','Training Rules','After that, if you pass the trolling section you are gonna need to answer questions in Quiz Section.');
				wait(15)
				remoteEvent:FireClient(b,'Message','Training Rules','Quiz Section have 4 questions and after passing it you gonna be ranked.');
				wait(13)
				remoteEvent:FireClient(Player,'PM',"Borispil Training Center",'Ready???',true)
				wait(10)
				remoteEvent:FireClient(b,'Message','Training Rules','Please be seated while our trainers will start claiming groups. If you have not been picked, go to co-host and ask for help.')
			end
		end
	end


	-- Return Everything to the MainModule --
	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


Error return pugin

Nothing working. Idk

Do you know how to script, out of interest?

I don’t know what do you mean

I don’t understand what is this? Can we solve the problem or not?

Do you know how to script, it’s a yes or a no answer.

No. I’m only have example to make this script

Okay, you need to learn how coding and debugging works before you can make anything like this, try learning how to code, not how to make things! :open_book:

Well wait. I already tried everything to make it work, can you help or don’t know how? I just wouldn’t do it that way.

If you can’t, say so. I will contact TheFuryFish. I don’t have much time anyway. The country is at war. There is little time.

You gotta learn how to code

TFF won’t be able to do anything

And what does this have to do with your plug-in?

I do know how to help but as @Deleted_User10 suggested you got to learn how to code, I can’t spoonfeed you every step of the way, there is a difference between me making your code and you making your code, also I understand the country is at war, you shouldn’t ever use that as an excuse to get people to do things that you want to be done.

Please refer to: How to make a good scripting support post