Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

how do i map xbox controller inputs to pc inputs?

Asked by
PynMan 0
3 years ago

I am trying to make a fighting game and I want my friend on xbox to be able to play said game, however I can not find any working tutorials. I would like if he presses LZ for it to input as "r" on keyboard controls same with say he presses X for it to input as "e". I also would like to bind "dpad up" to shift lock if possible. I have tried multiple tutorials and nothing works.

0
You can view this article. It shows how to run a function when a key is pressed or a controller button is pressed. https://developer.roblox.com/en-us/articles/Gamepad-Input appxritixn 2235 — 3y
0
ok so this is what i found via the wiki will this allow x to press e? local UserInputService = game:GetService("UserInputService") UserInputService.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.Gamepad1 then if input.KeyCode == Enum.KeyCode.ButtonX then Enum.KeyCode.E end end end) PynMan 0 — 3y

Answer this question