"Script timeout: exhausted" on almost all my scripts

Hey, I have around 2-3k active players on my game and when I check the “Error Report” I get a bunch of server errors with all the message “Script timeout: exhausted allowed execution time for the current resumption point”

Some of the scripts are the same just inside different models giving me the error but how is it possible that almost every script manages to give me this error? Is it something wrong in general on the server in that case?

game.Workspace.DraggableFolder.ChildAdded:Connect(function(child)
	if not child or not child:IsA("Model") then return end

	-- Find or add DragDetector
	local dragDetector = child:FindFirstChild("DragDetector")
	if not dragDetector then
		dragDetector = game.ReplicatedStorage.Addons.DragDetector:Clone()
		dragDetector.Parent = child
	end

	-- Ensure DragScript exists
	local dragScript = dragDetector:FindFirstChild("DragScript")
	if not dragScript then
		dragScript = game.ReplicatedStorage.Addons.DragDetector.DragScript:Clone()
		dragScript.Parent = dragDetector
	end

	-- Always enable
	dragDetector.Enabled = true
	dragScript.Enabled = true

	-- Transfer TempPlayer to LastPlayer if exists
	local tempPlayer = child:FindFirstChild("TempPlayer")
	if tempPlayer and tempPlayer.Value then
		local lastPlayer = dragDetector:FindFirstChild("LastPlayer")
		if lastPlayer then
			lastPlayer.Value = tempPlayer.Value
		end
	end

	-- Tag enemies with SpawnTime
	if child:FindFirstChild("Enemy") and not child:FindFirstChild("SpawnTime") then
		local tag = Instance.new("NumberValue")
		tag.Name = "SpawnTime"
		tag.Value = os.clock()
		tag.Parent = child
	end
end)

on line 2 on that script it gives me the error.

--// Modules and Setup
local currencyModule   = require(game.ServerScriptService.CurrencyModule)
local soundModule = require(game.ServerScriptService.Modules.SoundPosition)
local setupAttachmentsModule       = require(game.ServerScriptService.Modules.DragModules.SetupAttachments)
local displayModule    = require(game.ServerScriptService.Modules.DragModules.Display)
local tweenService     = game:GetService("TweenService")
local RunService       = game:GetService("RunService")
local Players          = game:GetService("Players")

same here, on line 2 the “currencyModule” give me error. So a bunch of scripts that uses “ChildAdded” are pretty much giving me error but also a bunch of scripts when I just try to require a module?

And I don’t even spam add that many ChildAdded + it does not seem to impact gameplay but it fills up my whole error report making it impossible to find real bugs.

Any help is appreciated!

Not sure how a currency module is having a script timed out, and “if not child or not child:IsA(“Model”) then return end” seems like a very unlikely candidate for a script timeout

More detail would probably be necessary

In workspace I have a folder named “DraggableFolder” and every model that I put inside of that I also put a DragDetector inside. I use a map generator system so a bunch of models are added all at the same time in to that folder. But as the currencyModule is giving me timeout I think it has to do with something else because its a lot of scripts that makes no sense to timeout, all they do is pretty much run with no weird loops or anything else.

Sorry, not enough detail is provided. I suggest looking at other posts with this bug to see how they dealt with this. Errors like these often required tailored fixes or significant detail (probably more than you’re willing to share). I personally would make sure adding things to draggable folder would not cause it to add more things to draggable folder, or try including a wait somewhere? I personally cannot figure out why it’d exhaust here though.