this is a simple module that creates a dropdown, you can add as many buttons as you want and each button can have a function
link :DropdownModule 1.3 - Roblox
this model comes with the module and the example shown in the videos below
this is one of my first community resources and i just want to see how well i did
it just uses a ui page layout and isnt hard to create without a script, i just wanted to test my skills at using module scripts
example script:
local dropdownmodule = require(game.ReplicatedStorage.DropdownModule)
local frame = dropdownmodule.new(script.Parent.TextButton, UDim2.new(1, 0, 1.5, 0), false, 0.1, 0.5, Enum.EasingDirection.Out, Enum.EasingStyle.Back, false --[[set this to false to show all buttons]], 1)
for i=1, 5 do --5 is how many buttons it will make
local mainbutton = frame:addbutton(script.TextButton:Clone(), "what") --they will all say what
end
frame.ButtonClicked:Connect(function(button)
script.Parent.TextButton.Text = button.Text
end)
I have one question, is there a way to make it a classic drop down menu where you see every option at the same time? Because the way it is looks good but doesn’t explain clearly what choices the Player has, otherwise looks good!
dropdown module 1.3 update, setting a value to false in the frame creation lets all buttons be shown
local frame = dropdownmodule.new(script.Parent.TextButton, UDim2.new(1, 0, 1.5, 0), false, 0.1, 0.5, Enum.EasingDirection.Out, Enum.EasingStyle.Back, false --[[set this to false to show all buttons]], 1)
Hello! Sorry to bump the post, but I am having a small issue. I’ve used this resource before and I love it, however for whatever reason this time it isn’t working properly. Even after copying the code from the last time I used it it still isn’t working right.
Basically the spacing between the buttons is really big even if I set it to a really small number.