So I trying to make my ui overal for console and a bit tweenings but on the selection api with the dropdown it not select the first TextButton in the dropdown it wierdly says that fyncontroler is an invalid Gui object
but it should be an valid Gui object since it is a text button I tried with printing it and it prints the correct ui element this is the script
local drop = script.Parent.dropdownframe
local button = drop:WaitForChild("fyncontroler") -- the button
local dropimage = script.Parent.edrop
local framee = script.Parent.Parent.Parent.Parent.a
--local frames = script.Parent.Parent.Parent.Parent.Parent.Parent.backframe.frames
local UIS = game:GetService("UserInputService")
local GS = game:GetService("GuiService")
local open = false
script.Parent.MouseButton1Click:Connect(function()
if open == false then
--if UIS.GamepadEnabled then
--GS:Select(script.Parent.dropdownframe)
GS.SelectedObject = button -- here
print(script.Parent.dropdownframe.fyncontroler)
--GS.SelectedObject = drop.fyncontroler
--end
framee.thumb.Visible = false
framee.x.Visible = false
dropimage.Rotation = 180
drop.Visible = true
--frames.Visible = false
open = true
elseif open == true then
--if UIS.GamepadEnabled then
GS.SelectedObject = script.Parent
--GS:Select(script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.frame2.controles.scroller.a.jump.jump)
--end
framee.thumb.Visible = true
framee.x.Visible = true
dropimage.Rotation = 0
drop.Visible = false
--frames.Visible = true
open = false
end
end)
It should toggle the dropdown frame and what disable the frame should be disabled if you click an button in the dropdown too and runs an function
The second is the tweenings it stops the intaire script from running if I tween all children from a frame it is a script with near 200 lines so I only place te loop
for i,v in frames:GetChildren() do
if v:IsA("ImageLabel") then
local SlidingEfectCN = TS:Create(v,TI,SizeCurrent)
SlidingEfectCN:Play()
v.Visible = false
end
end
nextframe.Visible = true
local SlidingEfectNN = TS:Create(nextframe,TI,SizeNew)
SlidingEfectNN:Play()
for i,v in buttons:GetChildren() do
if v:IsA("TextButton") then
v.Visible = false
end
end
Error I get
Unable to cast to Dictionary
What do you want to archive
I will that the tweenings should work and the dropdowns first button be selected on console