Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

attempt to concatenate table with string?

Hi! So, I'm trying to script a command for Basic Admin Essentials 2.0. I'm doing it as a plugin in the BAE plugin folder. I want to make a checkwarns command, I want it to say the players name too but when I add ..Player.. it shows the "attempt to concatenate table with string" error. Here's the code :p

	local function pluginFunction(Args)
		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 = combinedVictims..', '..b.Name
				end
			end
			for a,b in next,Victims do
				remoteEvent:FireClient(b,'Notif','Check Warns','The User '..Victims..' has no warns.',{'Message','Results',combinedVictims})
			end
		end
	end

Please help, thanks! Note: this isnt the full code, just the part I think the error is from.

No more help needed! I fixed the issue by simply just replacing..Victims.. with ..b.Name..

1 comment

0

try using unpack(Victims) or b at line 14

1 answer

✓ Accepted answer

On line 14 ur trying to concatenate a table with a string, Victims is a table and ur doing ..

2 comments

0

So, what do i do to fix it

0

Was stupid, forgot to mark this as an answer!

This discussion is preserved as it was. New answers, comments, and votes are closed.