So if im holding or clicking mouse its shooting normally but as long as i start spamming it will shoot much faster
the code:
User.InputBegan:Connect(function(input, gameProcessedEvent)
if ToolEquiped then
if input.UserInputType == Enum.UserInputType.MouseButton1 then
Mouse1Down = true
if Settings.ToolType == "Rifle" then
if Settings.FireMode == "Auto" then
while Mouse1Down do
shoot()
GunFx()
wait(60/Settings.FireRate)
end
elseif Settings.FireMode == "Semi" then
GunFx()
shoot()
wait(60/Settings.FireRate)
end
elseif Settings.ToolType == "Heal" then
shoot()
end
end
end
end)
Assuming that you know some scripting knowledge (let me know if you need more explanation), please note that every time you click, it fires your function “fresh.” What that means is say you clicked once, and then it starts waiting. But then, you click again, so it fires the weapons again and then starts waiting. That’s the problem.
Are you also looking for a solution or do you just want to know the problem with the code? I don’t see your goals in your post.