The nil below is what is printed if I try printing slotData.AvatarData.Height.
To make sure I was not mistaken or was somehow using the wrong dictionary, I went on to print every key and every value of it, and funnily enough height does exist.
for key, value in pairs(slotData.AvatarData) do
print(key, value);
if key == "Height" then
print("I found the height, roblox is trolling.");
end;
end;
Am I tripping? Did I make some basic mistake that I cannot see? Or is Roblox actually trolling me? Thank you!
Yeah, only the Height returns nil. It’s confusing me quite a lot. I had to use this workaround to make it work.
local Height = 1;
for key, value in pairs(slotData.AvatarData) do
if key == "Height" then
Height = value;
end;
end;
playerData.Avatar.Height.Value = Height;
Not ideal but getting the value from the dictionary won’t work.
Topic still open in case anyone has an explanation for what’s going on here.
The timing of the operations are very minimal and hard to notice. Direct accesses have a simple complexity of O(1) as opposed to O(n). Because of this subtle difference, it makes an impact regardless.