![]() If inputObject.UserInputType = Enum.UserInputType. UserInputService.InputEnded:Connect(function(inputObject) Roblox MouseButton1Down click not working Ask Question Asked 4 years, 9 months ago Modified 4 years, 9 months ago Viewed 773 times 1 I tried several ways, but nothing worked. UserInputService.InputBegan:Connect(function(inputObject, gameProcessed) Then on InputEnded we would simply change firing to false which will stop the loop running. The default mouse image is 64圆4 pixels, with the mouse taking up 17x24 pixels of space. The center of the image is where mouse inputs are issued. You would then create a while loop that runs under the conditions that firing is true and the ammo count is above 0. The following guidelines may prove useful when creating your own mouse cursors: The dimensions of the image used determines the size of the cursor. ![]() On InputBegan you would set a variable to true, in this example I name it “firing”. If inputState = thenĮlseif inputState = thenĬontextActionService:BindAction("MouseHold", mouseDetermineDown, false, 1)Īlternatively, you could use the UserInputService which is what I personally prefer. Local function mouseDetermineDown(actionName, inputState, inputObject) ![]() It will end up looking something similar to what Colbert suggested. Once the input has ended you can set the variable to false which will stop the loop. To do this you can use a while loop when the input begins with a variable that is set to true. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |