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

ScreenGUI, Filtering Enabled, Tween GUI Problem!?

Asked by 7 years ago

This is in a localscript, in a TextButton named MenuButton MenuButton is in a ScreenGUI named NewGUI The game has Filtering Enabled turned on.

1script.Parent.MouseButton1Click:connect(function(clickedMenu)
2    if clickedMenu then
3    script.Parent.Parent.Frame:TweenPosition(UDim2.new(0, 0,0, 0) 'Out' , 'Quint', 1)
4    script.Parent.Parent.Frame:TweenPosition(UDim2.new(0.19, 0,0.45, 0) 'Out' , 'Quint', 1)
5    elseif script.Parent.Parent.Frame.Position == '0, 0,0, 0' then
6    script.Parent.Parent.Frame:TweenPosition(UDim2.new(-0.17, 0,0, 0) 'Out' , 'Quint', 1)
7    script.Parent.Parent.Frame:TweenPosition(UDim2.new(0, 0,0.45, 0) 'Out' , 'Quint' , 1)
8    end
9end)

After testing, and clicking, noting happens.

1 answer

Log in to vote
0
Answered by 7 years ago

You've done it wrong. I fixed the script, see what you've done wrong.

01local clickedmenu = false
02 
03script.Parent.MouseButton1Click:connect(function()
04    if clickedmenu == false then
05    script.Parent.Parent.Frame:TweenPosition(UDim2.new(0, 0,0, 0), 'Out' , 'Quint', 1)
06    script.Parent.Parent.Frame:TweenPosition(UDim2.new(0.19, 0,0.45, 0), 'Out' , 'Quint', 1)
07    clickedmenu = true
08    elseif clickedmenu == true then
09    script.Parent.Parent.Frame:TweenPosition(UDim2.new(-0.17, 0,0, 0), 'Out' , 'Quint', 1)
10    script.Parent.Parent.Frame:TweenPosition(UDim2.new(0, 0,0.45, 0), 'Out' , 'Quint' , 1)
11    clickedmenu = false
12    end
13end)
Ad

Answer this question