I am working on a CameraAPI. I am stumped on one thing, though. This used to work before (with the same code), but now it doesn’t
I have a CameraApi table. It uses a constructor:
CameraApi:Instantiate()
The module itself calls this constructor on its last line of code
return CameraApi:Instantiate
The constructor returns the following metatable:
return setmetatable(Info, self)
Here’s where I go deeper into the problem. In Info, there is a class called Cutscene with the constructor :CreateCutscene with the argument CutsceneName (which is stored in its own Info table(no variable assigned))
Now, I need to explain the functions. It has a __nodes table.
I use getters(accessors) and setters(mutators) for my Cutscene class
function Info.Cutscene:GetCameraNodes()
return self.__nodes
end
I have a handy function which changes where the Camera Node faces.
function Info.Cutscene:SetNodeDirection()
local Nodes = self:GetCameraNodes
-- ...
end
Whenever I call :GetCameraNodes or print it, it returns nil in this function.
There is nothing that sets __nodes to nil, and this module worked before with the same exact code
Is this a bug from Roblox?