Deprecated 'Workspace' variable still highlights

Howdy! Earlier today I was working on a UI-Handler for a project of mine and declaring some local variables like Lighting and InventoryB as usual for a revamp and when I used the variable Workspace with local Workspace, it gave me a syntax color for that specific tag as I haven’t seen that appear before.

When you’re editing a script and put in this, it happens inside a script or inside Roblox Studio and started to happen when the new Script Editor update got released with Extra 1 and Extra 2. Some good detail or explanation of the bug is that the workspace Workspace keyword gets highlighted after putting it as a local variable or other usecases.

Image of the bug:

RobloxStudioBeta_ro6OomPntu

How to reproduce:

  • First, open up a LocalScript or a Script inside any Instance and use the Extra 1 or Extra 2 version for scripts to highlight as.
  • Second, put in this code sample when using a new syntax version:
local Lighting = game:GetService("Lighting")
local Workspace = game:GetService("Workspace")
  • It should highlight the Workspace / workspace as that is somehow deprecated by another user that I talked to about this.

WorkspaceSyntaxRepro.rbxl (21.1 KB)

Studio Version: 0.451.0.412446 (64-bit) as of 10/10/2020.

2 Likes

The global Workspace variable is deprecated, but workspace isn’t. Workspace or any built-in identifier being used should not highlight in the context of a variable declaration.

2 Likes

Thanks for the report! We’ve filed a ticket to our internal database and we’ll follow up when we have an update for you.

1 Like