I’m making a keybind system and I’m working on the keybinds gui. I heard that to get it in order as defined in the script, I have to use ipairs, but when I use ipairs, it just doesn’t run at all? Anyone know how to fix this or other ways?
for name, key in ipairs(keybindsData.current) do
local frame = content.Item:Clone()
frame.Visible = true
local nameLabel = frame:FindFirstChild("Name")
if nameLabel then
nameLabel.Text = tostring(name)
end
local keyButton = frame:FindFirstChild("Keybind")
if keyButton then
keyButton.Text = tostring(key.Name)
end
frame.Parent = content
end
KEYBINDS TABLE:
["Rotate Mode"] = Enum.KeyCode.LeftControl,
["Dribble"] = Enum.KeyCode.One,
["Pass"] = Enum.KeyCode.Two,
["Shoot"] = Enum.KeyCode.Three,
["Ping"] = Enum.KeyCode.Q,
["BallCamera"] = Enum.KeyCode.Backspace,