-
What do you want to achieve? I want to store client-only ModuleScripts inside of StarterPlayerScripts (In a “Controllers” folder) that utilize the Knit framework.
-
What is the issue? Knit reports that a controller (in this case,
ScreenResize
) was already created when attempting to run theCreateController
function from Knit when the game is run.
(When running the game, there are indeed two instances of this creation function being called, but I don’t expect the StarterPlayerScripts one to be called)
- What solutions have you tried so far? I’ve searched for this issue, but haven’t found anybody else experiencing it.
KnitRuntimeClient.client.lua
--Services
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local player = Players.LocalPlayer
--Folders
local controllersFolder = player:WaitForChild("PlayerScripts"):WaitForChild("Controllers")
--Modules
local Knit = require(ReplicatedStorage.Packages.Knit)
Knit.AddControllers(controllersFolder)
Knit.AddControllersDeep(controllersFolder)
Knit.Start()
How would I fix this?
Thanks