You should still listen for changes in the LastInputType using UserInputService.LastInputTypeChanged
considering there exists touchscreen laptops.
Otherwise, you should just do UserInputService:GetLastInputType()
to determine the LastInputType.
Personally I’d use ContextActionService as it’s more fit for the job, however if it’s absolutely necessary for it to be connected in RenderStepped, use the above method.