InputChanged code sample typo

In UserInputService | Documentation - Roblox Creator Hub, in Code Samples, lines 2 and 48, the first letter of userInputService must be uppercase, otherwise, there will be an error when copying/pasting the code to Studio.

1 Like

Not a valid issue. userInputService is a variable name, not the name of the service; it could even be aaaa if you wanted.

However, in accordance with Roblox’s style guide, it should be UserInputService.

4 Likes

PS: Try to make it clear right from the topic title what you’re filing a request on. I’ve just prepended InputChanged to the title to make it immediately clear what page you’re discussing.

4 Likes

To clarify, it looks like this is the issue:

Line 2 declares the userInputService variable (lowercase initial letter). This is used consistently on line 48, but line 36 refers to UserInputService (uppercase initial letter). This will error in the event of a Gyro input.

cc. @ElliottLMz

2 Likes

Sorry for trying to help Roblox. My only intention was to inform you that this Code Sample generates errors if it is just copied and pasted as it is.

1 Like

Thanks for pointing the error out. Yea — this probably should be fixed, my bad.