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.

script.Parent.MouseButton1Click:connect(function(clickedMenu)
    if clickedMenu then
    script.Parent.Parent.Frame:TweenPosition(UDim2.new(0, 0,0, 0) 'Out' , 'Quint', 1)
    script.Parent.Parent.Frame:TweenPosition(UDim2.new(0.19, 0,0.45, 0) 'Out' , 'Quint', 1)
    elseif script.Parent.Parent.Frame.Position == '0, 0,0, 0' then
    script.Parent.Parent.Frame:TweenPosition(UDim2.new(-0.17, 0,0, 0) 'Out' , 'Quint', 1)
    script.Parent.Parent.Frame:TweenPosition(UDim2.new(0, 0,0.45, 0) 'Out' , 'Quint' , 1)
    end
end)

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.

local clickedmenu = false

script.Parent.MouseButton1Click:connect(function()
    if clickedmenu == false then
    script.Parent.Parent.Frame:TweenPosition(UDim2.new(0, 0,0, 0), 'Out' , 'Quint', 1)
    script.Parent.Parent.Frame:TweenPosition(UDim2.new(0.19, 0,0.45, 0), 'Out' , 'Quint', 1)
    clickedmenu = true
    elseif clickedmenu == true then
    script.Parent.Parent.Frame:TweenPosition(UDim2.new(-0.17, 0,0, 0), 'Out' , 'Quint', 1)
    script.Parent.Parent.Frame:TweenPosition(UDim2.new(0, 0,0.45, 0), 'Out' , 'Quint' , 1)
    clickedmenu = false
    end
end)
Ad

Answer this question