HapticService¶
Provides haptic feedback to controllers and devices.
Description¶
HapticService allows scripts to query vibration support and set motor
intensities on gamepad controllers, VR controllers, and mobile devices. Use
IsVibrationSupported() and
IsMotorSupported() to check device
capabilities, then SetMotor() to drive a
specific VibrationMotor on a given UserInputType. Motor output
is scaled by the user's haptic intensity preference in their Roblox settings.
As this service is client-side only, it can only be used in a LocalScript, a ModuleScript required by a LocalScript, or a Script with RunContext set to RunContext.Client.
This service has been superseded by HapticEffect, which supports waveform-based effects, looping, spatial attenuation, and preset effect types. For new work, use HapticEffect instead.
Inheritance¶
Object → Instance → HapticService
Nova inheritance: Instance → HapticService
Methods¶
GetMotor Supported Function Returns the current vibration value set to the specified UserInputType and VibrationMotor.
Returns the current vibration value set to the specified UserInputType and VibrationMotor. This will not return anything if SetMotor() has not been called prior.
Roblox reference signature
IsMotorSupported Supported Function Returns true if the specified motor is available to be used with the specified UserInputType.
Returns true if the specified motor is available to be used with the
specified UserInputType.
Roblox reference signature
IsVibrationSupported Supported Function Returns true if the specified UserInputType supports haptic feedback.
Returns true if the specified UserInputType supports haptic
feedback.
SetMotor Supported Function Sets the vibration intensity of the specified UserInputType and VibrationMotor.
HapticService:SetMotor(UserInputType inputType, VibrationMotor vibrationMotor, Tuple vibrationValues)
Sets the vibration intensity of the specified UserInputType and VibrationMotor.
Sets the vibration intensity of the specified inputType and
vibrationMotor. Note that almost all usage cases specify
UserInputType.Gamepad1 for inputType which is internally mapped
to the device's respective hardware.
Roblox reference signature
Inherited members¶
Inherited from Instance: 8 properties, 36 methods, 7 events. They are documented on the base class page.
Roblox reference: HapticService
Generated from Nova's API dump and Roblox creator-docs. Nova-only members come from the engine's reflection metadata.