Argument 1 missing or nil

Hi, I have this remote event that fires if the dummy exists, and applys the players description to it, I send the humanoid, temparary description and the players actualy description. But, I get the error argument 1 missing or nil.

Local Script:

local Dummy = Frame.ViewportFrame[" "]
local Humanoid = Dummy.Humanoid
local PlayerDescription = Players:GetHumanoidDescriptionFromUserId(LocalPlayer.UserId)
local TempDescription = Players:GetHumanoidDescriptionFromUserId(1)

if Dummy then
ReplicatedStorage:WaitForChild("RemoteEvents").ApplyDescription:FireServer(Humanoid , TempDescription , PlayerDescription)
end

Server:

Event16.OnServerEvent:Connect(function(player , HumanoidToApplyTo , TempDescription , PlayerDescription)

HumanoidToApplyTo:ApplyDescription(TempDescription)
HumanoidToApplyTo:ApplyDescription(PlayerDescription)

end)

Any help would be appriciated, thanks!

What line does it say missing or nil?

This line says missing or nil.

Try debugging by printing TempDescription on the client, if it’s nil then it’s failing to get the humanoid description.

It doesn’t print nil, it prints HumanoidDescription

Also it looks like you’re using the function GetHumanoidDescriptionFromUserId by putting a 1 in the parameters, is that supposed yield anything?

Ok now try printing things on the Server side of things

Why is TempDiscription used? I see you change it to the player one instantly, no need to have it.

It prints nil for the server side, but I think I have an idea to fix it.

Would this be a good idea?

Event16.OnServerEvent:Connect(function(player , HumanoidToApplyTo)

local PlayerDescription = Players:GetHumanoidDescriptionFromUserId(player.UserId)
local TempDescription = Players:GetHumanoidDescriptionFromUserId(1)

HumanoidToApplyTo:ApplyDescription(TempDescription)
HumanoidToApplyTo:ApplyDescription(PlayerDescription)

end)

The character loads weirdly with apply description, the hats are in the wrong positions, but when I use a temp description then change it to the players descriptions the player’s hats load propely

1 Like