Hey all, I have recently started to use the knit framework in Roblox studio and have been finding it relatively useful (still practicing).
However as I am following the game tutorial on how to use knit, I am confused on how to get the instance of a component. I’ve looked on the documentation in order to find out how but I’m still confused.
Bare in mid that I do know that the tutorial is kind of outdated, I am trying to use more recent methods.
local Knit = require(game.ReplicatedStorage.Packages.Knit)
local Component = require(Knit.Util.Component)
local Trove = require(Knit.Util.Trove)
local Goal = Component.new({ Tag = "Goal" })
--// Where would I get the goal instance?
function Goal:Construct()
self._trove = Trove.new()
print("Goal was created")
self._trove:Add(function()
print("Goal Destroyed.")
end)
end
function Goal:Start() end
function Goal:Stop()
self._trove:Destroy()
end
return Goal