local order = 0
for name, key in input_moves do
order += 1
rep.MovesetVisual:Fire(name, key.Name, order) -- name, key, order
end
here is the code for cloning the template:
rep.MovesetVisual.Event:Connect(function(name, key, order)
if name == "M1" then
name = "Punch Combo"
key = "M1"
end
local move = template:Clone()
move.AbilityName.Text = name
move.Key.Text = key
move.Parent = ui
move.LayoutOrder = order
end)
what ends up happening when playing is this, however:
I think what you would need to do, is set the name of move to order, then for whatever layout type you are using, set the sort order property to name, this should fix the issue in theory.
I would also recommend using a UIListLayout instead of a grid, but honestly it doesnt matter to much as its going to give about the same results
Can I see the properties of the UIGridLayout?
Oh yes!!
When looping through the dictionary, chances are it doesnt sort in order, so if you turn it into an array, it should sort correctly. Since you want this:
You can just do this:
local input_moves = {
{Input = Enum.UserInputType.MouseButton1, Name = 'M1'}
}
haha, thank you both for the solutions. i will be noting of this in the future to avoid any more silly things happening with dictionaries :)))))))) I HATE DICTIONARIES