So I created a drop down menu such that when you click “Linear (up triangle)”, it gives you the menu of options shown in the screenshot. However, not all options work: Circular and Exponential buttons are non-functioning, as proven when I do MouseButton1Click on them. I’m not sure why.
The menu of options is in a separate ScreenGui to the ScreenGui that has all the numbers/text. I set the display order of the former to be higher than the display order of the latter.
for _,obj in ipairs(storageGui.easingStyleOptions:GetChildren()) do
if obj:IsA("TextButton") then
obj.MouseButton1Click:Connect(function()
mainFrame.animationOptions.easingStyleButton.easingStyleType.Text = obj.Text
mainFrame.animationOptions.easingStyleButton.BackgroundColor3 = Color3.fromRGB(255,255,255)
mainFrame.animationOptions.easingStyleButton.arrow.Text = "▲"
storageGui.easingStyleOptions.Visible=false
allScenes[currentSelectedFilmId][currentSelectedScene]["Animations"][currentAnimationSelected]["EasingStyle"] = obj.Text
print("Click")
end)
end
end
for _,obj in ipairs(storageGui.easingDirectionsOptions:GetChildren()) do
if obj:IsA("TextButton") then
print(obj.Text)
obj.MouseButton1Click:Connect(function()
mainFrame.animationOptions.easingDirectionButton.easingDirectionType.Text = obj.Text
mainFrame.animationOptions.easingDirectionButton.BackgroundColor3 = Color3.fromRGB(255,255,255)
mainFrame.animationOptions.easingDirectionButton.arrow.Text = "▲"
storageGui.easingDirectionsOptions.Visible=false
allScenes[currentSelectedFilmId][currentSelectedScene]["Animations"][currentAnimationSelected]["EasingDirection"] = obj.Text
print("click")
end)
end
end
This is all the code really. The menu UI is in storageGui. Assume any variable NOT ending in Button to be a parent frame.
storageGui.easingStyleOptions:GetChildren() contains all the buttons that you see in the picture. (Linear, Back, Quad, etc.)
same case with storageGui.easingDirectionsOptinos:GetChildren()
You don’t need to worry about the code inside the MouseButton1Clicks, that works fine. Just the event MouseButton1Click isn’t working.
Maybe clicks go “through”?
Because as I can see Circular and Exponential buttons overlap some ui.
You can check it by moving menu at a position where it would overlap nothing and check if clicks work.