-
What do you want to achieve? Keep it simple and clear!
I want to hide a UI element when the player swipes -
What is the issue? Include screenshots / videos if possible!
TouchSwipe event does not trigger when I swipe the UI element -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I saw an Engine bug report that was solved, so I think it’s a me problem
(Also yes, I tested it on a phone in real life)
The print statment does not print when I swipe the UI element
_UI.MoreInfo.TouchSwipe:Connect(function(dir, num)
print("test")
if dir ~= Enum.SwipeDirection.Down and num ~= 1 then return end
game:GetService("TweenService"):Create(
_UI.MoreInfo,
TweenInfo.new(0.25, Enum.EasingStyle.Sine),
{Position = UDim2.fromScale(0,1)}
):Play()
end)
Below is code from a plain Frame I tested, nothing happened again. (Even on a moblie device)
script.Parent.TouchSwipe:Connect(function()
print("test")
game:GetService("TweenService"):Create(
script.Parent,
TweenInfo.new(1),
{Position = UDim2.fromScale(0,1)}
):Play()
end)