UserInputService:IsMouseButtonPressed description example incorrect comment format resulting in error

The lua example provided in the description of the UserInputService:IsMouseButtonPressed function page incorrectly formats comment.


Issue lies on line three of the code sample provided in the description see below.

// The UserInputType value passed is 0

should be

-- The UserInputType value passed is 0

Image

Code sample
local UserInputService = game:GetService("UserInputService")
 
// The UserInputType value passed is 0
local pressed = UserInputService:IsMouseButtonPressed(0)
Error

image


Code sample w/ fix
local UserInputService = game:GetService("UserInputService")
 
-- The UserInputType value passed is 0
local pressed = UserInputService:IsMouseButtonPressed(0)

Thank you for the report. This issue has now been resolved.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.