Help with WaitForChild On Tools

I’ve tried to solve this myself for a while now, But nothing seems to work.

I have also tried putting a WaitForChild() on literally every variable, But since nothing shows up in the Output it’s hard to find what’s wrong.

local ReplicatedStorage = game.ReplicatedStorage

local ServerScriptService = game.ServerScriptService

local moduleFolder = ReplicatedStorage:WaitForChild("Modules")

local RaycastHitbox = require(moduleFolder:WaitForChild("RaycastHitboxV4"))

local tool = script.Parent

local cs = tool:WaitForChild("Client_Script")

local ToolFolder = cs:WaitForChild("ToolFolder")

local sm = tool:WaitForChild("SettingsModule")

local SettingsModule = require(sm)

local UIS = game:GetService("UserInputService")

local ValueFolder = ToolFolder:WaitForChild("Values")

local CanHit = SettingsModule.CanHit

local CanPlaySwingAnim = true

local EventFolder = ToolFolder:WaitForChild("Events")

local replicatedeventfolder = ReplicatedStorage:WaitForChild("Events")

local ev = replicatedeventfolder:WaitForChild("Hit")

local bloodmodule = require(ServerScriptService:WaitForChild("BloodSplatterModule"))

game.Players.PlayerAdded:connect(function(plr)

repeat wait() until plr.Character

local char = plr.Character

local LocalHumanoid = char:WaitForChild("Humanoid")

local rm = require(moduleFolder:WaitForChild("RagdollModule"))

local Params = RaycastParams.new()

Params.FilterDescendantsInstances = {char}

Params.FilterType = Enum.RaycastFilterType.Blacklist

local Hitbox = RaycastHitbox.new(tool.HitboxPart)

Hitbox.RaycastParams = Params

Hitbox.Visualizer = true

local AnimationFolder = ToolFolder:WaitForChild("Animations")

local SoundFolder = ToolFolder:WaitForChild("Sounds")

local eq = AnimationFolder:WaitForChild("EquipAnim")

local id = AnimationFolder:WaitForChild("IdleAnimation")

local sw = AnimationFolder:WaitForChild("SwingAnimation")

local EquipSound = SoundFolder:WaitForChild("Equip")

local SwingSound = SoundFolder:WaitForChild("Swing")

local OnHitSound = SoundFolder:WaitForChild("Hit")

local valueHit = ValueFolder:WaitForChild("canHit")

local EquipAnim = LocalHumanoid:LoadAnimation(eq)

local IdleAnim = LocalHumanoid:LoadAnimation(id)

local SwingAnim = LocalHumanoid:LoadAnimation(sw)

I Think it’s trying to wait for something that does not exist, stopping the code.

Any suggestions, Or possible solutions?

If the code keeps waiting for something with WaitForChild, it should eventually output a warning saying what it’s waiting for. Nothing in the output?
You could try putting a print() behind every single WaitForChild to see how far it gets.

Trying that now. Thank you for replying.