DrawingImmediate. GetPaint Synchronous
Get the paint event used for immediate drawing. Connect a listener when shapes depend on current frame state, and disconnect it when the overlay should disappear.
Luau
DrawingImmediate.GetPaint(zIndex: number?) -> RBXScriptSignalParameters
| Parameter | Type | Description |
|---|---|---|
zIndex | number? | Optional numeric argument. It is validated but currently does not select a layer. |
Returns
RBXScriptSignalThe host RunService.RenderStepped signal.
Usage notes
The GetPaint argument currently has no visual effect. DrawingImmediate calls made in the listener must be resubmitted each frame.
Differences from Volt
Volt documents a paint signal for each Z index. Kawaii returns the host RenderStepped signal and currently ignores zIndex after validating it. Passing different indices does not create separate paint layers.
Example
Luau
local paint = DrawingImmediate.GetPaint()
local connection = paint:Connect(function()
DrawingImmediate.Line(Vector2.new(40, 40), Vector2.new(180, 40), Color3.fromRGB(240, 150, 190), 1, 2)
end)
task.delay(3, function() connection:Disconnect() end)