Controller Functions?

Controller Functions - How To Make?

  1. I want to be able to use a usual function, except it is a controller function. Preferably when clicked a certain button

  2. I have tried looking it up but there are no videos on functions for controller devices…

Example:

For example, I want it to enter the menu in my game whenever someone clicks the Home button on there Controller device

Conclusion:

Thanks for reading my forum post, If there is anything you want to know please let me know in the forum comments section! Again, thanks for reading my post! Peace :smiley_cat:

The ContextActionService allows bindings that use controller inputs via :BindAction(). Here’s a list of key codes that you may use.

local input = game:GetService("UserInputService")
input.InputBegan:Connect(function(button)
if button.KeyCode == Enum.KeyCode.ButtonL2 then
--Script Here
end
end)

Can you send me a diagram of the controller buttons that roblox uses so I can have the basic buttons to code?