Skip to content

HapticService

Supported Class Services NotCreatable NotReplicated Service

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.
HapticService:GetMotor(UserInputType inputType, VibrationMotor vibrationMotor): Tuple

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
HapticService:GetMotor(inputType: UserInputType, vibrationMotor: VibrationMotor): Tuple

Roblox documentation

IsMotorSupported Supported Function Returns true if the specified motor is available to be used with the specified UserInputType.
HapticService:IsMotorSupported(UserInputType inputType, VibrationMotor vibrationMotor): bool

Returns true if the specified motor is available to be used with the specified UserInputType.

Roblox reference signature
HapticService:IsMotorSupported(inputType: UserInputType, vibrationMotor: VibrationMotor): bool

Roblox documentation

IsVibrationSupported Supported Function Returns true if the specified UserInputType supports haptic feedback.
HapticService:IsVibrationSupported(UserInputType inputType): bool

Returns true if the specified UserInputType supports haptic feedback.

Roblox reference signature
HapticService:IsVibrationSupported(inputType: UserInputType): bool

Roblox documentation

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
HapticService:SetMotor(inputType: UserInputType, vibrationMotor: VibrationMotor, vibrationValues: Tuple): null

Roblox documentation

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.