The code sample should be changed from
local userInputService = game:GetService("UserInputService")
function(touch, gameProcessedEvent)
local oldPosition = touch.Position - touch.Delta
print("Touch moved from "..tostring(oldPosition).."to "..tostring(touch.Position))
end
userInputService.TouchMoved:Connect(TouchMoved)
to
local userInputService = game:GetService("UserInputService")
function TouchMoved(touch, gameProcessedEvent)
local oldPosition = touch.Position - touch.Delta
print("Touch moved from "..tostring(oldPosition).."to "..tostring(touch.Position))
end
userInputService.TouchMoved:Connect(TouchMoved)