HapticEffect
Modern controllers and devices have motors built‑in to provide haptic feedback. Adding rumbles and vibrations can provide subtle feedback that is hard to convey through visuals or audio.
Roblox supports haptics for the following devices:
- Android and iOS phones supporting haptics including most iPhone, Pixel, and Samsung Galaxy devices
- PlayStation gamepads
- Xbox gamepads
- Quest Touch controller
Summary
Properties
Whether the haptic effect loops continuously.
Along with Radius, specifies the impact position relative to the input device and, effectively, how broadly that impact effects nearby motors.
Along with Position, specifies the impact radius relative to the input device and, effectively, how broadly that impact effects nearby motors.
Enum.HapticEffectType describing the haptic type.
Methods
Plays the haptic effect.
Method used to define a custom waveform as a table and apply it to the haptic.
Stops the haptic effect.
Properties
Looped
Whether the haptic effect loops continuously.
local Workspace = game:GetService("Workspace")local effect = Instance.new("HapticEffect")effect.Type = Enum.HapticEffectType.GameplayExplosioneffect.Looped = trueeffect.Parent = Workspace-- Start the haptic effecteffect:Play()-- After two seconds, stop the effecttask.wait(2)effect:Stop()
Position
Along with Radius, specifies the impact position relative to the input device and, effectively, how broadly that impact effects nearby motors. Note that some gamepads do not have both "small" and "large" motors, and that "gamepad large left/right" is not supported on PC.

local Workspace = game:GetService("Workspace")local effect = Instance.new("HapticEffect")-- Set the position and radius of impacteffect.Position = Vector3.new(0.5, 0.5, 0)effect.Radius = 1effect.Parent = Workspaceeffect:Play()
Radius
Along with Position, specifies the impact radius relative to the input device and, effectively, how broadly that impact effects nearby motors. Note that some gamepads do not have both "small" and "large" motors, and that "gamepad large left/right" is not supported on PC.

local Workspace = game:GetService("Workspace")local effect = Instance.new("HapticEffect")-- Set the position and radius of impacteffect.Position = Vector3.new(0.5, 0.5, 0)effect.Radius = 1effect.Parent = Workspace-- Play the haptic effecteffect:Play()
The haptic type, such as Enum.HapticEffectType.GameplayCollision for a large immediate rumble that dies down quickly. The Enum.HapticEffectType.Custom value lets you specify a haptic with custom waveform keys defined through SetWaveformKeys().
Waveform
Methods
Play
Plays the haptic effect.
local Workspace = game:GetService("Workspace")local effect = Instance.new("HapticEffect")effect.Type = Enum.HapticEffectType.GameplayExplosioneffect.Parent = Workspace-- Play the haptic effecteffect:Play()
Returns
SetWaveformKeys
This method lets you define a custom waveform as a table and apply it to the haptic.
local Workspace = game:GetService("Workspace")local effect = Instance.new("HapticEffect")-- Set effect type to custom in order to define a waveformeffect.Type = Enum.HapticEffectType.Customeffect.Parent = Workspace-- Define the custom waveform curve through a tablelocal rampUpWaveform = {FloatCurveKey.new(0, 0.3),FloatCurveKey.new(100, 0.4),FloatCurveKey.new(300, 0.8),FloatCurveKey.new(400, 1.0)}-- Set waveform through the effect's methodeffect:SetWaveformKeys(rampUpWaveform)
Parameters
Returns
Stop
Stops the haptic effect.
local Workspace = game:GetService("Workspace")local effect = Instance.new("HapticEffect")effect.Type = Enum.HapticEffectType.GameplayExplosioneffect.Looped = trueeffect.Parent = Workspace-- Start the haptic effecteffect:Play()-- After two seconds, stop the effecttask.wait(2)effect:Stop()