So I’m making a gui where the player can choose options, the only issue is making the text actually display the options they have. Although rather simple and I DID managed to get it working, I don’t like how the code looks. I’m trying to make the text display as specified in a table, each options have numerical name instead of alphabetical name (1, 2, 3, 4) Does anyone have other ways to make this or is this literally the only way?
part.ClickDetector.MouseClick:Connect(function(plr)
local Character = plr.Character
local Root = Character.PrimaryPart
local PosDiff = (part.Position - part.Position).Magnitude
local DarkFrame = plr.PlayerGui:FindFirstChild("DarkFrame")
Camera.CameraType = Enum.CameraType.Scriptable
if PosDiff <= 10.6 then
local newUi = ui:Clone()
newUi.Name = "Location"
newUi.Parent = plr.PlayerGui
newUi["1"].Text = Option[1]
newUi["2"].Text = Option[2]
newUi["3"].Text = Option[3]
newUi["4"].Text = Option[4]
end
end)