UserinputService does not work properly, any solutions ?
So, basically this script was supposed to work i assume, the script should've run something every time i hold my mouse's left button and then stop when i release it, but instead when i click once it just runs without stopping, but if you hold it a little longer, it works fine, i don't understand why isn't it working, i hope you can help me.
01 | tool.Equipped:Connect( function () |
02 | game.ReplicatedStorage.Equip:FireServer() |
04 | TextLabel.Visible = true |
06 | UIS.InputBegan:Connect( function (input) |
07 | if input.UserInputType = = Enum.UserInputType.MouseButton 1 then |
09 | while pressed and tool.Equipped do |
15 | if mouse.Target.Parent:FindFirstChild( "Humanoid" ) then |
16 | script.Parent.Damage:FireServer(mouse.Target) |
27 | UIS.InputEnded:Connect( function (input) |
28 | if input.UserInputType = = Enum.UserInputType.MouseButton 1 then |