Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

Buttons not coming back after tweening?

Asked by
Uroxus 350 Moderation Voter
9 years ago

I'm trying to create a menu screen with GUIs. The first script works fine, It makes all of the GUIs tween to the left, and makes another GUI end up in the middle of the screen. Its the second one of the two scripts which is causing the issue. All of the GUIs re-appear apart from the Help (Frame['Help'])

The first script is a normal, located in a button. The second is a local script, also located in a button. Bothlocal Framesin the script end up at the same place (I am aware there is one extra .Parent in the second script.)

local function Tween()
    local Frame = script.Parent.Parent.Parent
    Frame['Play']:TweenPosition(UDim2.new(0, -300, 0, 25), "In" , "Quad", 0.5)
    Frame['Help']:TweenPosition(UDim2.new(0, -300, 0, 205), "In" , "Quad", 0.5) 
    Frame['GameStore']:TweenPosition(UDim2.new(0, -300, 0, 385), "In" , "Quad", 0.5)
    Frame['RobuxShop']:TweenPosition(UDim2.new(0, -300, 0, 565), "In" , "Quad", 0.5)
    Frame['Bar']:TweenPosition(UDim2.new(0, -300, 0, 1), "In" , "Quad", 0.5)
    Frame['HelpOpen']:TweenPosition(UDim2.new())
end

script.Parent.MouseButton1Click:connect(Tween)
-- Tween script for opening the GUI (All GUIs tween to the left when the 'Help' button is clicked. This works perfectly fine)
local function Tween()
    local Frame = script.Parent.Parent.Parent.Parent
    Frame['Play']:TweenPosition(UDim2.new(0, 50, 0, 25), "In" , "Quad", 0.5)
    Frame['Help']:TweenPosition(UDim2.new(0, 50, 205), "In" , "Quad", 0.5) 
    Frame['GameStore']:TweenPosition(UDim2.new(0, 50, 0, 385), "In" , "Quad", 0.5)
    Frame['RobuxShop']:TweenPosition(UDim2.new(0, 50, 0, 565), "In" , "Quad", 0.5)
    Frame['Bar']:TweenPosition(UDim2.new(0, 1, 0, 1), "In" , "Quad", 0.5)
    Frame['HelpOpen']:TweenPosition(UDim2.new(0, -1200, 0, 0), "In" , "Quad", 0.5)

end

script.Parent.MouseButton1Click:connect(Tween)
-- Tween script for the back button GUI. All of the buttons re-appear BUT the frame named 'Help' (The one you click on to make the next thing appear) 

If someone could help make the Frame['Help'] come back, that would be great. Thanks ~MrLego :)

0
There's no reason it shouldn't come back unless you deleted it or put the wrong position. Goulstem 8144 — 9y
0
Actually, on line 8 you didn't put any other arguments in. Goulstem 8144 — 9y
0
If you mean on the first script, That doesn't seem to make any difference... It's the second one that doesn't work properly Uroxus 350 — 9y

1 answer

Log in to vote
1
Answered by 9 years ago

I don't know much about GUIs, but I do know common sense.

You only have three numbers in the Frame['Help']. All of the other ones you have four. Try that?

1
Duuudddeee, I didnt even see that. Cheers man ;3 Uroxus 350 — 9y
0
Good luck :) secretassassin3 30 — 9y
Ad

Answer this question