#New input system doesnt work
1 messages · Page 1 of 1 (latest)
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)
you can just use UserInPutService
this one seems way more efficient ngl
yes
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
-- 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
local UserInputService = game:GetService("UserInputService")
-- A sample function providing one usage of InputBegan
local function onInputBegan(input, _gameProcessed)
if input.KeyCode == Enum.KeyCode.E then
print("E was pressed")
end
end
UserInputService.InputBegan:Connect(onInputBegan)
something like tha
t