This is my KnitRun code:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Knit = require(ReplicatedStorage:WaitForChild("Packages"):WaitForChild("Knit"))
Knit.AddControllers(script.Parent:WaitForChild("Controllers"))
Knit.Start():andThen(function()
print("Knit has started on client")
end)
and this is my module for creating the only controller inside the folder:
local UserInputService = game:GetService("UserInputService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local toCombat = ReplicatedStorage:WaitForChild("Remotes"):WaitForChild("toCombat")
local Knit = require(ReplicatedStorage:WaitForChild("Packages"):WaitForChild("Knit"))
local InputController = Knit.CreateController {
Name = "InputController",
}
local function onInput(input, gp)
if gp then return end
if input.UserInputType ~= Enum.UserInputType.MouseButton1 then
return
end
toCombat:FireServer()
print("fired")
end
function InputController:KnitInit()
print("hello1")
UserInputService.InputBegan:Connect(onInput)
print("hello")
end
function InputController:KnitStart()
print("started")
end
return InputController
Please help, I can’t find why it’s not working!