uis.InputBegan:connect(function(input,process)
    if  not process and input.KeyCode == Enum.KeyCode.H then

edited

uis.InputBegan:connect(function(input,process)
    if  not process and input.MouseButton1  then

4 comments

0

The inputObject contains the input type and states.

0

I edited it, but it says MouseButton1 is not a valid member of InputObject

0

I think it’s supposed to be “input.UserInputType.MouseButton1” or “input.UserInputType == Enum.UserInputType.MouseButton1”.

0

I tried the second one, and it worked, thanks.