local Slots = 
{
	["One"] = "one";
	["Two"] = "two";
	["Three"] = "three";
}


local UserInput = game:GetService("UserInputService")
local LocalPlayer = game.Players.LocalPlayer
local BackPack = LocalPlayer.Backpack


function SetupInventory()
	for i, v in pairs(BackPack:GetChildren()) do
		Slots[i] = v
		print(Slots[i]) -- This is displaying the newer version correctly
	end
end


function SwitchSlot(Key)
   local KeySlot = tostring(Key.Name)
   print(Slots[KeySlot]) -- This shows a older version of the slot table for some reason
end

SetupInventory()
UserInput.InputBegan:Connect(SwitchSlot)