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

ScreenGUI, Filtering Enabled, Tween GUI Problem!?

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

✓ Accepted answer

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)

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