Help with bot gui

I would like the bot to be able to clone someones character like the :char command.
2. Error
21:55:45.425 Character is not a valid member of Model “Workspace.wrlkoihbsdftsfdgsdfg” - Client - LocalScript:39
21:55:45.425 Stack Begin - Studio
21:55:45.426 Script ‘Players.cyberneticlogix.PlayerGui.Bot.MainFrame.LocalScript’, Line 39 - Studio - LocalScript:39
21:55:45.426 Stack End - Studio
Current code below

local mainpkg =  script.Parent.Parent
local textlbls = mainpkg.MainFrame.TLS
local createbutton = mainpkg.MainFrame.BCreate
local value = mainpkg.Assets.BNum.Value
local LocalPlayer = game.Players.LocalPlayer
local BAnim = mainpkg.MainFrame.BAnim
local BCharacter = mainpkg.MainFrame.BCharacter
local BCreate = mainpkg.MainFrame.BCreate
local BName = mainpkg.MainFrame.BName


createbutton.MouseButton1Down:Connect(function()
	
	
	
	if value ~= 1 then do 
		local dummy = mainpkg.Assets.Dummy:Clone()
		
		dummy.Parent = game:GetService("Workspace")
		dummy.Head.CFrame = LocalPlayer.Character.PrimaryPart.CFrame
		 
			
			
		--  Dummy Name Handler
		BName:GetPropertyChangedSignal("Text"):Connect(function()
			dummy.Name = BName.Text
		end)
			
			
			-- Character handler scraps from my admin commands
			BCharacter:GetPropertyChangedSignal("Text"):Connect(function ()
				local humanoiddescription = nil

				local success, err = pcall(function()
					humanoiddescription = game:GetService("Players"):GetHumanoidDescriptionFromUserId(game:GetService("Players"):GetUserIdFromNameAsync(BCharacter.Text))
				end)

				if humanoiddescription ~= nil then
					if dummy.Character.Humanoid:FindFirstChild("HumanoidDescription") then
						
							local pasthumanoiddescription = dummy.Character.Humanoid.HumanoidDescription
							humanoiddescription.BodyTypeScale = pasthumanoiddescription.BodyTypeScale
							humanoiddescription.DepthScale = pasthumanoiddescription.DepthScale
							humanoiddescription.HeadScale = pasthumanoiddescription.HeadScale
							humanoiddescription.HeightScale = pasthumanoiddescription.HeightScale
							humanoiddescription.ProportionScale = pasthumanoiddescription.ProportionScale
							humanoiddescription.WidthScale = pasthumanoiddescription.WidthScale

					end
				end
				if success then
					dummy.Character.Humanoid:ApplyDescription(humanoiddescription)
				end 
			end)
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			value = value + 1
			textlbls.TBot.Text = "Number of bots: 1/1"
			end 
	elseif value == 1 then do
			print("You already have a bot.")
			textlbls.TBot.Text = "YOU ALREADY HAVE A BOT!"
			wait(2)
			textlbls.TBot.Text = "Number of bots: 1/1"
			
		end
	end
	
end)





This is a Client Local Script? or a Server Script inside the NPC?

A client script inside a gui on the localplayer

So you have a text box in the player’s gui, and when player inputs text, a function is called to try to find the player’s humanoid description, if true apply the HumanoidDescription into the Dummy cloned (which stored in the local script, right?)

I tried your code, and kinda works with some modifications, but. What exactly you want to achieve?
You want that only the client being able to see the clones? Thats why client sided?
You dont care the function is being called each character the player inputs?
When using my name Dev_Peashie, Roblox found a player called “Dev” while I was typing my name.
A button to accept/confirm would be useful, instead of looking each player’s input.

Something like this could work. I didnt change the update when player input is called:
(Theres a Dummy and a custom HumanoidDescription inside the local script for cloning)

local TextBox = script.Parent:WaitForChild("TextBox")
local TextButton = script.Parent:WaitForChild("TextButton")
local DummyToClone = script.Dummy
local DummyDesc = script.HumanoidDescription

local LocalPlayer = game.Players.LocalPlayer

local dummy

TextBox:GetPropertyChangedSignal("Text"):Connect(function ()
	if not dummy then
		dummy = DummyToClone:Clone()
		dummy.Parent = game.Workspace	
	end
	
	local success, humDesc = pcall(function()
		return game:GetService("Players"):GetHumanoidDescriptionFromUserId(game:GetService("Players"):GetUserIdFromNameAsync(TextBox.Text))
	end)
	if success then
		if humDesc then
			humDesc.BodyTypeScale = DummyDesc.BodyTypeScale
			humDesc.DepthScale = DummyDesc.DepthScale
			humDesc.HeadScale = DummyDesc.HeadScale
			humDesc.HeightScale = DummyDesc.HeightScale
			humDesc.ProportionScale = DummyDesc.ProportionScale
			humDesc.WidthScale = DummyDesc.WidthScale
			
			dummy.Humanoid:ApplyDescription(humDesc)
			dummy.Humanoid.DisplayName = tostring(TextBox.Text)
			dummy.HumanoidRootPart.CFrame = LocalPlayer.Character.HumanoidRootPart.CFrame * CFrame.new(5,0,0)
			dummy.HumanoidRootPart.Anchored = false
		end
	else
		warn("failed")
	end
end)

TextButton.Activated:Connect(function()
	dummy = false
end)

You need to set the players character achievable.

just make a script in server script service and when a player joins let i wait for the character to load and then set the character achievable. Not that hard