Hello. I have been trying to make a script clear your accessories and then load in your current roblox avatar accessories.
local player = game.Players:FindFirstChild(username) local playeruserid = player.UserId print(playeruserid) print(type(playeruserid)) clearAccessories(character) -- This is working like it should. Don't mind the "character" variable. wait(0.5) character.Humanoid:ApplyDescription(game.Players:GetHumanoidDescriptionFromUserId(playeruserid))
The issue is the last line of the code not running correctly. If I replace the "playeruserid" variable with a userid manually, such as "1081709372" the script works fine. I can't figure out why, because using the two prints I can see that I get a correct userid in the variable and it is of the number type.
It should be the same as if I put it in manually, considering it's an ID in the number type? I did try running the tonumber function prior to putting it in without success.
Solved. Refer to this article for the issue: