I don't understand why this won't work, I went onto wiki and followed the instructions. I've been on the Forum quite some time asking but no one wishes to answer. Help?
function openside()
if on == false then
on = true
Background:TweenPosition(UDim2.new(0.5, 0, 0, 0))
MenuSelection:TweenPosition(UDim2.new(0,0,0,0))
repeat wait() until MenuSelection.Position == UDim2.new(0,0,0,0) and Background.Position == UDim2.new(0.5, 0,0,0)
on = false
end
end
function closeside()
if on == false then
on = true
Background:TweenPosition(UDim2.new(0, 0, 0, 0))
MenuSelection:TweenPosition(UDim2.new(-0.5,0,0,0))
repeat wait() until MenuSelection.Position == UDim2.new(-.5,0,0,0) and Background.Position == UDim2.new(0, 0,0,0)
on = false
end
end
MainBackground.TouchSwipe:connect(function(dir)
if dir == 0 then
openside()
elseif dir == 1 then
closeside()
end
end)

3 comments
Are there blue lines under some of the words?
Do you have the variables used in the script defined?
Any output?