This code is from the Roblox wiki on how to create a simple drop down menu:
local RbxGui = LoadLibrary("RbxGui") local gui = script.Parent local items = {"Test1","Test2"} local function onItemSelected(itemSelected) print(itemSelected) end local dropDown = RbxGui.CreateDropDownMenu(items,onItemSelected,false,true) dropDown.Parent = gui dropDown.Size = UDim2.new(.5,0,0,30) dropDown.Position = UDim2.new(0.45,-75,0.5,-15)
However, this code is deprecated , and there for, it's not a good idea to use it. But was wondering if there could be any other alternative to creata a drop down menu without using deprecated code. Thanks.