Gamepad Controls Not Working! Can Anyone Help Me?
So i was making gamepad controls for my Gun and it doesn't come up with red lines but it wont work when i play the game
heres the script to show:
04 | local userInputService = game:GetService( "UserInputService" ) |
05 | userInputService.InputChanged:connect( function (input, processed) |
06 | if input.UserInputType = = Enum.UserInputType.Gamepad 1 then |
07 | if input.KeyCode = = Enum.KeyCode.ButtonX then |
08 | if ( not Reloading) and ( not Running) then |
10 | elseif input.KeyCode = = Enum.KeyCode.ButtonB and S.CanKnife then |
11 | if KnifeReady and ( not Knifing) and ( not ThrowingGrenade) then |
12 | if Aimed then UnAimGun( true ) end |
19 | delay(S.KnifeCooldown, function () |
22 | elseif input.KeyCode = = Enum.KeyCode.ButtonL 1 and S.Throwables then |
23 | if ( not Knifing) and ( not Running) and ( not Aimed) and ( not Aiming) and ( not ThrowingGrenade) then |
24 | if TacticalGrenades.Value > 0 then |
25 | TacticalGrenades.Value = TacticalGrenades.Value - 1 |
26 | ThrowingGrenade = true |
28 | ThrowingGrenade = false |
29 | elseif input.KeyCode = = Enum.KeyCode.ButtonY then |
30 | if ( not AimingIn) and ( not Aimed) then |