Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-3

Excuse me, but.... Can anyone help?

Asked by 11 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

Hi, erm, I have loads of scripting that needs to be done for a project I'm doing. What I seriously need done is, so, you have a partner in this project, and I want to make it so at the beginning you can choose between five partners. Like, function on click, and then that partner follows you and yadda. So, can anyone help? I seriously need this. qq

0
Btw, I only put physics because idk what this would be. qq Seaspirit89 0 — 11y
0
This isn't a request forum. PiggyJingles 358 — 11y
0
@Piggy I'm simply trying to learn a script, not commission one off. >_> Seaspirit89 0 — 11y

1 answer

Log in to vote
0
Answered by 11 years ago
01local library = assert(LoadLibrary('RbxGui')) -- load our RbxGui library
02 
03function onItemSelected(item) -- create our callback that gets called when an item gets selected
04    -- arguments:  item (string)
05    print("'" .. item .. "' was selected!")
06end
07 
08local listOfItems={"This", "is", "a", "list", "of", "items.","For","Your","Partners"} -- our list of items
09local dropDownList, updateSelection=library.CreateDropDownMenu(listOfItems, onItemSelected); -- create the drop down list with our list and the callback
10dropDownList.Size = UDim2.new(1, 0, 1, 0) -- this is to make the drop down list fit in our GUI correctly
11 
12local holderGui = Instance.new('ScreenGui') -- make the screen gui that holds everything
13local holderFrame = Instance.new('Frame') -- make a frame to hold the drop down list
14holderFrame.Size = UDim2.new(0, 200, 0, 26) -- make it the size you want
15holderFrame.Position = UDim2.new(0.5, -100, 0.5, -20) -- position it the way you want (right now it's in the center)
View all 26 lines...

Is this what your looking for?

0
Thank you! From what I can understand from scripting, this looks good! Seaspirit89 0 — 11y
0
No problem I'm glad I'm able to assist you! GoodkidMad 14 — 11y
Ad

Answer this question