Skip to content

UPDATE: Enum properties and methods#673

Merged
Kampfkarren merged 17 commits into
Kampfkarren:mainfrom
Ashp116:fix-668
May 18, 2026
Merged

UPDATE: Enum properties and methods#673
Kampfkarren merged 17 commits into
Kampfkarren:mainfrom
Ashp116:fix-668

Conversation

@Ashp116

@Ashp116 Ashp116 commented May 16, 2026

Copy link
Copy Markdown
Contributor

Description

This PR fixes #668 and #619 . This will resolve the errors when it comes to using FromName and FromValue for Enums. This will also resolve :IsA() and EnumType for the EnumItems

tags:
fixes #668
fixes #619

Replication

NOTE: For the replication test I allowed unused_variable warnings were allowed

Current Implementation

test.luau

local name = Enum.KeyCode.A.Name
local value = Enum.KeyCode.A.Value
local isA = Enum.KeyCode.A:IsA("Enum.KeyCode.A")
local enumType = Enum.KeyCode.A.EnumType

local keyFromName = Enum.KeyCode:FromName("Enum.Keycode.A")
local keyFromValues = Enum.RaycastFilterType:FromValue(97)
local enums = Enum.KeyCode:GetEnumItems() 

stderr
test.luau

error[incorrect_standard_library_use]: standard library global `Enum.KeyCode.A` does not contain the field `IsA`
  ┌─ .\test.luau:3:13
  │
3 │ local isA = Enum.KeyCode.A:IsA("Enum.KeyCode.A")
  │             ^^^^^^^^^^^^^^^^^^

error[incorrect_standard_library_use]: standard library global `Enum.KeyCode.A` does not contain the field `EnumType`
  ┌─ .\test.luau:4:18
  │
4 │ local enumType = Enum.KeyCode.A.EnumType
  │                  ^^^^^^^^^^^^^^^^^^^^^^^

error[incorrect_standard_library_use]: standard library global `Enum.KeyCode` does not contain the field `FromName`
  ┌─ .\test.luau:6:21
  │
6 │ local keyFromName = Enum.KeyCode:FromName("Enum.Keycode.A")
  │                     ^^^^^^^^^^^^^^^^^^^^^

error[incorrect_standard_library_use]: standard library global `Enum.RaycastFilterType` does not contain the field `FromValue`
  ┌─ .\test.luau:7:23
  │
7 │ local keyFromValues = Enum.RaycastFilterType:FromValue(97)
  │                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Results:
4 errors
0 warnings
0 parse errors
PR Update

test.luau

local name = Enum.KeyCode.A.Name
local value = Enum.KeyCode.A.Value
local isA = Enum.KeyCode.A:IsA("Enum.KeyCode.A")
local enumType = Enum.KeyCode.A.EnumType

local keyFromName = Enum.KeyCode:FromName("Enum.Keycode.A")
local keyFromValues = Enum.RaycastFilterType:FromValue(97)
local enums = Enum.KeyCode:GetEnumItems() 

stdout

Results:
0 errors
0 warnings
0 parse errors

Comment thread CHANGELOG.md Outdated
Comment thread CHANGELOG.md Outdated
Co-authored-by: boyned//Kampfkarren <3190756+Kampfkarren@users.noreply.github.com>
@Kampfkarren Kampfkarren enabled auto-merge (squash) May 18, 2026 04:14
@Kampfkarren Kampfkarren merged commit 4340021 into Kampfkarren:main May 18, 2026
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Enum.AlphaMode does not contain FromName [Roblox bug]: Enum :FromName() and :FromValue() are not recognized

2 participants