Why is this happening?

I am trying to create oop classes, yep simple as that.

I have this script which creates the oop class and stores it in a ModuleScript

local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
-- Where the class will be stored
local ClientProfile = require(script.Parent:WaitForChild("ClientProfile"))
-- The oop class itself
local ClientPlayerProfile = require(script.Parent:WaitForChild("ClientPlayerProfile"))

local ProfileInfo = {}
ProfileInfo.Player = LocalPlayer

local Profile = ClientPlayerProfile:New(ProfileInfo)

ClientProfile.Profile = Profile

Now in the oop class :Initiate() method, There are 2 more classes which are created. But here’s where the fun starts. As soon as I delete the script above, the processing just stops, even though the class is stored in another ModuleScript.

Why is this happening?

Your question and source of error aren’t clear. Could you provide more context and what exactly you mean by “processing just stops”? Can’t get an idea of your environment nor the issue with just this amount of code and the vague problem description.

Here’s a basic example of what I mean by “processing just stops”:

The viewmodel position is updated per frame, but if I delete the script ClientMain, the position of the viewmodel never updates. There’s also another class for movement abilities (crouch, prone, sprint, slide), the player input is never checked and you can’t perform the abilities even if the keybinds are correct. Now I can guarantee there’s no bugs in the classes because everything works fine if I leave ClientMain alone.