How would i create an effective stun system?

The hits are inside a InputBegan connection

local UserInputService = game:GetService("UserInputService")
local hits = 0
UserInputService.InputBegan:Connect(function(i, g)
   if g then return end
   if i.UserInputType == Enum.UserInputType.MouseButton1 then
      hits += 1 -- increment hits
      if hits >= 5 then
         hits = 0
         Stun()
      end
   end
end)

I’ve made another reply that centers around on combos but maybe you can blend it in

1 Like