DrawingImmediate.Rectangle
Draws a rectangle outline during the current paint callback.
Must run inside a GetPaint signal callback. This returns no retained object; redraw on every paint and disconnect the callback to stop drawing.
DrawingImmediate.Rectangle(position: Vector2, size: Vector2, color: Color3, opacity: number, thickness: number): ()Parameters
| Parameter | Type | Description |
|---|---|---|
position | Vector2 | Top-left corner. |
size | Vector2 | Width and height. |
color | Color3 | Stroke color. |
opacity | number | 0 is invisible; 1 is opaque. Values are clamped. |
thickness | number | Stroke thickness. |
Errors: Calling outside a paint callback or supplying incompatible argument types raises an error.
