PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

TouchpadModeChanged

The TouchpadModeChanged event fires if the Enum/VRTouchpadMode of a Enum/VRTouchpad is changed. This event indicates the VRTouchpad that changes, and its new state.

You can use this event to track the states of VRTouchpads connected via the user’s client.

This /VRService event can be used alongside /UserInputService service events and functions.

Since the event fires locally, it can only be used in a /LocalScript.

Parameters

Name Type Default Description

pad

The touchpad that changed mode.

The new mode.


Code Samples


VRService.TouchpadModeChanged

​This example fires when the state of a VRTouchpad changes. It prints the name of the Touchpad that changed, and the state that it changed to.

local VRService = game:GetService("VRService")

VRService.NavigationRequested:Connect(function(pad, mode)
	print(pad.Name + "Touchpad changed to state: " + mode.Name)
end)