Hey devs, I currently know Enum.Material, Enum.KeyCode, Enum.CameraType and CameraMode. Are their any other useful / important ones that I should know? Thanks
Well, there are many of them, but importance is defined by what game you are making.
Here is the enum index:
https://developer.roblox.com/en-us/api-reference/enum
If you read about some of them, you may find the importance of it.
I was just on that page like 1 minute ago lol but I will go through each one
You don’t need to know all of the “important” Enums
- instead, as you’re creating an event that consist of parameters for checking (such as input
from UserInputService.InputBegan), you’d need to specify of what you’d want to achieve - therefore, it’s substantial to read material to get to your goal.
For instance, let’s state I wanted to know when a player clicks, and I do acknowledge that .InputBegan
is required - hence,
game:GetService("UserInputService").InputBegan:Connect(function(input)
--code here
end)
However, if I didn’t know an Enum
for specialising in that role, I’d read the index documentation, or type in the code Enum.Input
to see if there’s anything that sounds relative since input
. Once I figured out, I’d be able to finish my code:
game:GetService("UserInputService").InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
print("player clicked - found Enum!")
end
end)
You can remember Enums at your own pace, but do not force remembrance. Simply know that Enums are used mainly for drop-down list properties like material
. They are also used in performing checks and checking statuses like when you use Enum.KeyCode
for checking inputs. When you need to use one, you can either remember the one you need or look it up. Eventually, you will use/see the Enum enough that you remember it.
For example:
script.Parent.Material = Enum.Material.Wood