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)
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)