It happens even when I’m just building, but here you go:
Thank for trying to help me 
frame = script.Parent
frame.Active = true
local currpage = 1
local function onTouchSwipe(swipeDir, touchCount)
local currFrame = script.Parent:FindFirstChild('page' .. currpage)
local nextFrame
local leftPos = UDim2.new(-1.5,0,0,0)
local midPos = UDim2.new(0,0,0,0)
local rightPos = UDim2.new(1.5,0,0,0)
local currTweenPos
if swipeDir == Enum.SwipeDirection.Right then
-- previous page
print("previous page")
if currpage > 1 then
currpage = currpage - 1
nextFrame = script.Parent:FindFirstChild('page' .. currpage - 1)
currTweenPos = rightPos
end
elseif swipeDir == Enum.SwipeDirection.Left then
-- next page
print("next page")
print("Total pages: " .. #script.Parent:GetChildren() - 2)
if currpage < (#script.Parent:GetChildren() - 2) then
currpage = currpage - 1
nextFrame = script.Parent:FindFirstChild('page' .. currpage + 1)
currTweenPos = leftPos
end
end
-- Update the color and bounce the frame a little
--print("gonna tween " .. currFrame.Name .. " to " .. currTweenPos)
currFrame:TweenPosition(currTweenPos, Enum.EasingDirection.Out, Enum.EasingStyle.Quad, .7, true)
nextFrame:TweenPosition(midPos, Enum.EasingDirection.In, Enum.EasingStyle.Quad, .7, true)
end
frame.TouchSwipe:Connect(onTouchSwipe)