Hello! I have a game that allows the player to shine a flashlight by holding down RMB(RightMouseButton) But I can't seem to find the correct use for it in UIS. Here's the script that I have: (its local)
local uis = game:GetService("UserInputService")
local holdingRMB = false
uis.InputBegan:Connect(function(inputObject)
if inputObject.KeyCode == Enum.KeyCode.??? then
holdingRMB = true
end
end)
Any working answer is appreciated.

2 comments
Thanks! But don't forget to always put your code in code blocks.
sorry. i edited it in code blocks