Hi, i am confused on the syntax for and "Or" in an if statement and it is causing my code to error
if inputObject.KeyCode == Enum.KeyCode.W or inputObject.KeyCode == Enum.KeyCode.A or inputObject.KeyCode == Enum.KeyCode.S or inputObject.KeyCode == Enum.KeyCode.D and isGrabbing == true then
end

4 comments
Your error...?
Is correct
20:40:15.995 - Workspace.Code1400.PickUpHandlerClient:114: attempt to index nil with 'Parent'. Its weird it because it doesnt reference the if statment. when i press W the code will be run even though the "and's" value hasn't been met.
and the code runs fine if i don't have the "or" operators in it