#New input system doesnt work

1 messages · Page 1 of 1 (latest)

bleak hollow
#

i just started learning lua so excuse if i have stupid mistakes

#
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Keybind = require(ReplicatedStorage.Keybind)
local action = Keybind.GetAction("idle", "pressButton")
action.Keyboard Binding.KeyCode = Enum.KeyCode.E
Keybind.EnableContext("idle")
action.Pressed:Connect(function()
print("hey")
end)
strange herald
bleak hollow
strange herald
#

inputbegan

#

then u can just look at some tutorials or websites

#

and u can detect heyboard or mouse very easy

#

it even works for ps or mobile

bleak hollow
#

o you recommend a website

#

It's still new so I haven't seen any yt tutorial

strange herald
#

-- We must get the UserInputService before we can use it
local UserInputService = game:GetService("UserInputService")

-- A sample function providing one usage of InputBegan
local function onInputBegan(input, _gameProcessed)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
print("The left mouse button has been pressed!")
end
end

UserInputService.InputBegan:Connect(onInputBegan)

#

for example

bleak hollow
#

Ohh

#

Okay thanks

strange herald
#

something like tha

#

t