So I want to make this program but when there are two of them running at the same time, none of them works. Also, if you don't mind, can you explain me how this code works?
function onKeyPress(actionName, userInputState, inputObject)
if userInputState == Enum.UserInputState.Begin then
script.Parent.YAAA:FireServer()
end
end
game.ContextActionService:BindAction("keyPress", onKeyPress, false, Enum.KeyCode.R)
function onKeyPress(actionName, userInputState, inputObject)
if userInputState == Enum.UserInputState.Begin then
script.Parent.Fire:FireServer()
end
end
game.ContextActionService:BindAction("keyPress", onKeyPress, false, Enum.KeyCode.E)

4 comments
This didn't work, it only binds to the 2nd function I want each of them to have their own function
Have you tried the seccond solution
Thank you
If this questions answers the issue @superbolt999 can you mark this question as the answer?