Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.
CompletionAcceptanceBehavior
Controls how the Script Editor treats existing text after the cursor when you accept an autocomplete suggestion with Enter or Tab. Accepting a completion always replaces the typed prefix before the cursor. The active value is stored in Studio.AutocompleteAcceptanceBehavior, which defaults to CompletionAcceptanceBehavior.InsertOnEnterReplaceOnTab.
Items
| Name | Value | Description |
|---|---|---|
| Insert | 0 | Accepting a completion with either Enter or Tab inserts the suggestion without replacing existing text after the cursor. |
| Replace | 1 | Accepting a completion with either Enter or Tab replaces existing text after the cursor with the full suggestion text. |
| ReplaceOnEnterInsertOnTab | 2 | Pressing Enter replaces existing text after the cursor; pressing Tab inserts without replacing text after the cursor. |
| InsertOnEnterReplaceOnTab | 3 | Pressing Enter inserts without replacing text after the cursor; pressing Tab replaces text after the cursor. This is the default of Studio.AutocompleteAcceptanceBehavior. |
Insert
Accepting a completion with either Enter or Tab inserts the suggestion without replacing existing text after the cursor.
| Field | Value |
|---|---|
| value | 0 |
Replace
Accepting a completion with either Enter or Tab replaces existing text after the cursor with the full suggestion text.
| Field | Value |
|---|---|
| value | 1 |
ReplaceOnEnterInsertOnTab
Pressing Enter replaces existing text after the cursor; pressing Tab inserts without replacing text after the cursor.
| Field | Value |
|---|---|
| value | 2 |
InsertOnEnterReplaceOnTab
Pressing Enter inserts without replacing text after the cursor; pressing Tab replaces text after the cursor. This is the default of Studio.AutocompleteAcceptanceBehavior.
| Field | Value |
|---|---|
| value | 3 |