I’m new to scripting, and I’ve been struggling to script a UI menu for my upcoming game.
I’ve been trying to make use of TweenService to make a UI button move to a certain position when clicked, alongside the code put in place to make the UI move to it’s desired position, there is a script that makes the size of the button increase when a player hovers their mouse over the button. My goal is to make the UI button remain at the enlarged size when a player hovers their cursor, and to move to a position, when players click on the button after it has moved to the new position, the button moves back to it’s original place, and goes back to it’s original size. When clicked, the other buttons turn invisible, once the sequence above is executed, the other 2 buttons become visible again. I’ll link some footage of the problem I’m currently facing. It would be greatly appreciated if someone could help show me how to perform the scripting work required to achieve this effect, thanks in advance! (Scripts are linked below)
Hover Script.lua (578 Bytes)
Click script.lua (179 Bytes)