I’m currently scripting a Roblox game project of mine, however while doing so I ran into several issues upon scripting my UI buttons, specifically issues with the ‘end’ line of a script.
local button1 = script.Parent.Parent.Continue1
local button2 = script.Parent
wait(2)
if button1.MouseButton1Click:Connect(function()
button1.Parent.FRAME_1.Visible = false
button1.Visible = false
button2.Visible = true
button2.Parent.FRAME_2.Visible = true
end)
end
end
end
end
end)
My goal is to make a button detect when the button before it is clicked, in order to proceed in showing a number of frames. I need this ‘end’ issue solved soon, as my game release is pretty time sensitive.
This script is repeated in a few other UI buttons, too, so if this script works as expected it would solve all the issues for all the UI button scripts. Any help would be appreciated!