no problem, it has also happened to me. Good idea, this may be one of the causes, currently the frame properties are as follows:
local emotes = Instance.new("Frame")
emotes.Name = "Emotes"
emotes.AnchorPoint = Vector2.new(0.5, 0.5)
emotes.BackgroundTransparency = 1
emotes.Position = UDim2.fromScale(0.5, 0.94)
emotes.Size = UDim2.fromScale(0.485, 0.0881)
emotes.Parent = mainGui
The properties of a button are as follows
local template = Instance.new("ImageButton")
template.Name = emoteName or "NaN"
template.AnchorPoint = Vector2.new(0.5, 0.5)
template.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
template.BackgroundTransparency = 0.25
template.BorderSizePixel = 0
template.Position = UDim2.fromScale(0.0706, 0.406)
template.Size = if isPhone then UDim2.fromScale(.176, 1.749) else UDim2.fromScale(0.146, 1.18)
Within each button there is a list of instances but I doubt very much that this is the cause.
![image](//devforum-uploads.s3.dualstack.us-east-2.amazonaws.com/uploads/original/5X/7/9/c/1/79c140c569a2ed972d38c059385087e14859098d.png)
the properties of the button on the left are as follows
local leftButton = Instance.new("ImageButton")
leftButton.Name = "0"
leftButton.Image = "rbxassetid://12974423379"
leftButton.AnchorPoint = Vector2.new(0.5, 0.5)
leftButton.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
leftButton.BackgroundTransparency = 0.25
leftButton.BorderSizePixel = 0
leftButton.Size = UDim2.fromScale(0.0898, 0.725)
local uICorner = Instance.new("UICorner")
uICorner.CornerRadius = UDim.new(0.1, 0)
uICorner.Parent = leftButton
local LeftuIAspectRatioConstraint = Instance.new("UIAspectRatioConstraint")
LeftuIAspectRatioConstraint.AspectRatio = 0.988
LeftuIAspectRatioConstraint.Parent = leftButton
to get my function to update in the order I want the buttons, I insert the buttons manually in the table
![image](//devforum-uploads.s3.dualstack.us-east-2.amazonaws.com/uploads/original/5X/0/a/b/1/0ab11e12448ece0337259798d7a64ff5b635a2d4.png)
for _, obj in ipairs(hotbarFrame:GetChildren()) do
result[#result + 1] = obj
end
rightButton.Parent = hotbarFrame
leftButton.Parent = hotbarFrame
table.insert(result, 1, leftButton)
result[#result + 1] = rightButton
this information could be useful to identify the problem, I will test different sizes for the hotbar.