#Avatar Loading Issues

17 messages · Page 1 of 1 (latest)

hollow maple
#

so im trying to make a system where if u claim a part, it sets a value to the persons name but I tried to get the players avatare ontop of it, by get the username from the value.

#

this is the code ```local Players = game:GetService("Players")
local Dum = script.Parent
local valID = script.Parent.Parent:WaitForChild("ClaimedUserName")
local ID = Players:GetUserIdFromNameAsync(valID.Value) --userID

local function CreateOfflineCharacter(UserID, Dummy)
local Appearance = Players:GetHumanoidDescriptionFromUserId(UserID)
Dummy.Humanoid:ApplyDescription(Appearance)
end

if script.Parent.Parent.ClaimedUserName.Changed then
print("updating")
CreateOfflineCharacter(ID, Dum)
end

#

but this is error 08:54:25.529 Players:GetUserIdFromNameAsync() failed: Unknown user - Server - Script:4

#

oh wait

#

am stoopid

#

loll

#

oh wait no

#

Players:GetUserIdFromNameAsync(username) basiucally

#

am so confused

#

pls helpppplplplplplpl

#

so the valID is theplayer username and the :GetUserIdFromNameAsync() function takes the name and gets the id

#

but it says the user is unknown

#

i ytried just my username and it worked

#

is it bc its a string val

#

idk man

#

ima add a wait time cus since it changes the dummy to the avatar when the value changes it thinks the value loading in counts as it chanmging

hollow maple
#

r