Im using knit and I made a clientruntime script that initializes knit and adds all the controllers. When i call knit.start it says knit already started. I went through the knit module to see what the problem was and i added a print(debug.traceback()) line to see where it was being started from. Roblox printed ReplicatedStorage.Packages._Index.sleitnick_knit@1.4.7.knit.KnitClient:318 function Start Players.inqxiirblx.PlayerScripts.Client.ClientRuntime:5. That is the correct script path but there is nothing in line 5
However, I do have a SERVER script that calls knit.Start() on line 5 but only on the knitserver module, so this shouldnt happen. Even if it called it on the knitclient module, why is roblox saying it is being called from the clientruntime script, in a line where there is nothing? Also if the function was actually called, the controllers would have printed statements when knit initialized
Yes it should happen, if you have a line of code in the ModuleScript that would fire on a normal script, and you require the said ModuleScript. It will still fire the code, but only once.
Even if on the Server, or Module, you are still firing it
I think you edited the script and Roblox Luau VM didn’t noticed the change. Edit the script by adding a comment or something then apply changes. Also restart Roblox Studio if it persists.
No, that’s not how the knit module works. It’s separated into 2 separate modules, client and server. The server script is ONLY requiring the server knit modulescript. I only added the print(debug.traceback) onto the client modulescript, so it would not print if the server was called. The server does not in any part require the client modulescript. Even if it did, the traceback would print that the function is being called from the serverscript, not the client script. Also, I changed the server script to confirm that its not from there because now the server script doesnt call it on the 5th line but the output still says the function was called from the 5th line of the client runtime script
I’ve tried restarting studio, editing both scripts, deleting the script and rewriting it. It just isn’t working no matter what I try. I guess a very lazy fix I could do is knit will only stop accepting start requests after it has been called twice, but that could easily create bugs if the current situation were to change.