UserInputService.InputBegan firing twice

So i have this .InputBegan function that is supposed to only fire once but its firing twice, i tried :Disconnect() but either the function wasnt working at all or it didnt do anything

UIS.InputBegan:Connect(function(key)
	if key.KeyCode == Enum.KeyCode.Return then
		print("reeeeeee")
		SendCommand()
	end
end)

Ive looked around the forum but the solutions there didnt help

1 Like

the only way that would happen if you connected that function twice or you are pressing yhe button twice

the function which this is in is only called once (checked that with print()) and im pressing the button only 1 time, maybe its a bug? But idk

just add debounce like i don’t know why that happens, check your keyboard

i tried a debounce too but that didnt help and my keybord should work fine but imma test it anyway

never mind i found the problem, a second test script was still calling the module this is in

Be careful next time and goodluck :four_leaf_clover:

1 Like