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

Help with making drop down menu through client side?

Asked by
waifuSZN 123
8 years ago
Edited 8 years ago
01local Players = game:GetService("Players")
02local RbxGui = LoadLibrary("RbxGui")
03local gui = script.Parent
04local i = 1
05local playerTable = {}
06 
07--When a new player joins, add them to the table
08 
09Players.PlayerAdded:Connect(function(Player)
10    playerTable[i] = "Player.Name"
11    i = i + 1
12end)
13 
14local playerList = RbxGui.CreateDropDownMenu(playerTable,onPlayerSelected,false,true)
15playerList.Parent = gui
16playerList.Size = UDim2.new(0,150,0,30)
17playerList.Position = UDim2.new(0.5,-75,0.5,-15)

The purpose of this script is to add each player to the drop down menu upon joining, as you see.

However, since you cannot do anything w/ GUIs in the server, I am unsure how to do this script from the client side.

My question is:

How would I alter this so that this will run from the client side?

0
You will need to make a new drop down menu each time as you cannot update the existing items in the list, also you have "Player.Name"?? User#5423 17 — 8y
0
How should I store the name then? waifuSZN 123 — 8y

Answer this question