Your trying to use the method that gets the players name by userid. You also don’t have to use 2 remotes if they are different, all you need todo is check what it is
I believe the solution your looking for is
This is how I would do it, I am unsure if this is really efficient or readable so I left comments and I apologize if this didn’t solve anything.
-- Remote script
local Event = nil -- Replace nil with your event.
if Send and textbox.Text then
local Players = game:GetService("Players") -- Better to declare service names instead of game.Players
local ServerStorage = game:GetService("ServerStorage") -- I believe this returns nil if your script isn't in ServerStorage or ServerScriptService?
local Remote = nil -- Replace nil with your remote
local function GetAppearanceFromPlayer(input) -- Gets the appearance using 2 methods and checking what type of input was given
local Appearance = nil
local UserID = nil
if typeof(input) == "string" then -- unsure if this is how typeof works, I never use it. Please fix what it is equal to if I'm incorrect.
UserID = Players:GetUserIdFromNameAsync(input) -- This only applies to account name and not display names
elseif typeof(input) == "number" then
UserID = Players:GetPlayerByUserId(input) -- You can also use UserIds to get the appearance!
if UserID then
Appearance = Players:GetHumanoidDescriptionFromUserId(UserID) -- Checks if the UserID was found, and gets the appearance
return Appearance -- Only returns nil if the UserID never was a players id
Remote.OnServerEvent:Connect(function(Player: Player, User: string | number) -- Replaced Username: name -> User: string | number which allows the usage of userids and usernames
for _, value in pairs(ServerStorage:GetDescendants()) do
if value:IsA("Model") and value.Name == "Dummy" then
local Character = value
local Humanoid = Character:FindFirstChildWhichIsA("Humanoid")
local Description = GetAppearanceFromPlayer(User)
if Character and Humanoid and Description then
If you have any errors with this script please reply back.
EDIT: To explain what this is doing is, when you fireserver the Remote, it checks the entire ServerStorage for models with the name Dummy which I assume your looking for. It then gets the Character and Humanoid then calls the GetAppearanceFromPlayer function I created with the textbox’s text you sent, which then returns the UserID even if its string or number. And if the Character, Humanoid, and Description are returned not as nil then it will apply the humanoid. (This might be a little confusing, I believe someone could make this a little easy to understand?)