I have code where it will do a while wait() do loop, but as the server time goes on, the wait() loop becomes noticeably slower. There are no other wait() commands inside the loop, either. What could be causing this?

game.ReplicatedStorage.Universals.DoDamage.OnServerEvent:Connect(function(player, dmg, stand, standScript, toggle) repeat wait() until player.Character local Character = player.Character standScript.Barraging.Value = toggle if toggle == false then return end while wait() do if standScript.Barraging.Value == false then return end for i,v in pairs(GetTouchingParts(stand.LeftArm))do local humanoid = v.Parent:FindFirstChild("Humanoid") or v.Parent.Parent:FindFirstChild("Humanoid") if humanoid then if humanoid.Parent ~= Character then humanoid:TakeDamage(dmg) end end end for i,v in pairs(GetTouchingParts(stand.RightArm))do local humanoid = v.Parent:FindFirstChild("Humanoid") or v.Parent.Parent:FindFirstChild("Humanoid") if humanoid then if humanoid.Parent ~= Character then humanoid:TakeDamage(dmg) end end end end end)