Espirael
(Espirael)
August 15, 2023, 5:30am
1
It’s simply not triggering.
if key.KeyCode == Enum.KeyCode.Plus or key.KeyCode == Enum.KeyCode.KeypadPlus then
FirstInput = false
if Input1 == "" then return end
functioanlity = "+"
output.Text = Input1 .. functioanlity
click:Play()
end```
4 Likes
works fine for me, do you have numlock enabled on your keyboard?
my code:
game:GetService("UserInputService").InputBegan:Connect(function(key)
if key.KeyCode == Enum.KeyCode.Plus or key.KeyCode == Enum.KeyCode.KeypadPlus then
print("+")
end
end)
My only other guess is that you have something wrong with the rest of your code, hard to tell though with the small bit of code you gave.
Espirael
(Espirael)
August 15, 2023, 5:57am
3
The only one that doesn’t work is the one that isn’t on the number pad. It might be a problem with my keyboard.
Have you tried printing the input.KeyCode to see what your keyboard button is actually mapped to?
Espirael
(Espirael)
August 16, 2023, 11:13pm
5
It’s returning Equals and not plus after further examination.
Farmboy014
(Farmboy014)
August 16, 2023, 11:20pm
6
You mean the one that has both the plus and equal?
Espirael
(Espirael)
August 16, 2023, 11:27pm
8
No quite literally Plus is returning “Equals” but equals is returning Equals as normal. If I understood that correctly.
Farmboy014
(Farmboy014)
August 16, 2023, 11:36pm
9
Does the plus on the number pad return plus? The one thats not on number pad do you mean this key?
BillB1ox
(Will)
August 16, 2023, 11:40pm
10
It’s either you are not pressing shift + =, just =, or there is another issue. Can you show us the output window after pressing plus?
Assuming it’s the first thing, I would make it detect equals instead of plus.
Espirael
(Espirael)
August 16, 2023, 11:52pm
11
Issue is, I am having something else that is using equals, and yeah one second let me get the output window.
Espirael
(Espirael)
August 16, 2023, 11:58pm
12
I do and it does return plus yes, although on my keyboard = is above plus dont know if that matters.
Espirael
(Espirael)
August 17, 2023, 12:00am
13
This is what my output looks like for input.KeyCode
Farmboy014
(Farmboy014)
August 17, 2023, 12:17am
14
They key that returns equal, is that the double =+ key?
Espirael
(Espirael)
August 17, 2023, 12:21am
15
Yeah it is. Is that where the issue is coming from?
Farmboy014
(Farmboy014)
August 17, 2023, 1:01am
16
Is the plus on top, or on bottom?
Espirael
(Espirael)
August 17, 2023, 1:17am
17
It’s on the bottom the equals sign takes priority.
Farmboy014
(Farmboy014)
August 17, 2023, 1:21am
18
Ok, that probably is the issue that equal sign takes priority, and roblox may not be able to detect the key combination that results in a plus.
Espirael
(Espirael)
August 17, 2023, 1:26am
19
Do you have any solutions to offer
Farmboy014
(Farmboy014)
August 17, 2023, 1:36am
20
Sure, what are you wanting it to do after it detects?
Espirael
(Espirael)
August 17, 2023, 2:11am
21
I just need to know how to detect the plus.