At the top of the PlayerModule script (found in PlayerScripts during runtime) is says:
provides getters for developers to access methods on these singletons without
having to modify Roblox-supplied scripts.
However there is no obvious way to access the objects it creates to be able to fire the methods within the script. If anyone knows how to access these objects that would be great.
It is not the requiring that is the issue, it is accessing the objects that it has created, when they are created they are returned however I can not find which script is calling the constructor.
I am trying to access the objects created by this constructor:
function PlayerModule.new()
local self = setmetatable({},PlayerModule)
self.cameras = require(script:WaitForChild("CameraModule"))
self.controls = require(script:WaitForChild("ControlModule"))
return self
end
This returned a table when I tried it, so I assume you can use that. Otherwise, if this isn’t what you’re looking for, I suppose I don’t have the help that you need.
All of these have their own getter methods, (e.g. PlayerModule:GetControls())
local PlayerModule = require(game:GetService("Players").LocalPlayer:WaitForChild("PlayerScripts"):WaitForChild("PlayerModule"))
local controls = PlayerModule:GetControls()