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

Basic Admin custom command not working?

Hey. I'm trying to make a host command with Basic Admin Essentials. Also filteringenabled is turned off. (This is the code)

	-- Plugin Configuration --
	local pluginName = 'host'
	local pluginPrefix = Prefix
	local pluginLevel = 3
	local pluginUsage = "<User(s)>" -- leave blank if the command has no arguments
	local pluginDescription = "Host a server."
	
	-- Example Plugin Function --
	local function pluginFunction(Args) -- keep the name of the function as "pluginFunction"
		local Player = Args[1]
		while true do
           game.StarterGui.HostInfo.TextLabel.Text = 'Host: '..Player
		end
	end

When I test the command (on studio) this error comes up: Function Error - ServerScriptService.Basic Admin Essentials2.0.Plugins.Example Plugin:48: Attempt to concatenate local 'Player' (a userdata value)

3 comments

0

Make sure that the Basic Admin Essentials is placed in ServerScriptService..

0

Also try removing any extra spaces..

0

Done that now but hasn’t worked :/

1 answer

Attempt to concatenate local 'Player' (a userdata value) is the key here. you can only concatenate numbers with strings, or tables with a string(as long as the table has a meta-table with __tostring())

so looking at your code, i think you meant to do: game.StarterGui.HostInfo.TextLabel.Text = 'Host: '.. (Player.Name)

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