Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Buttons not coming back after tweening?

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 :)

3 comments

0

There's no reason it shouldn't come back unless you deleted it or put the wrong position.

0

Actually, on line 8 you didn't put any other arguments in.

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

1 answer

✓ Accepted answer

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?

2 comments

1

Duuudddeee, I didnt even see that. Cheers man ;3

0

Good luck :)

This discussion is preserved as it was. New answers, comments, and votes are closed.