Is this works?
local LocalPlayer = game:GetService("Players").LocalPlayer
local Cameras = require(LocalPlayer.PlayerScripts.PlayerModule):GetCameras()
Is this works?
local LocalPlayer = game:GetService("Players").LocalPlayer
local Cameras = require(LocalPlayer.PlayerScripts.PlayerModule):GetCameras()
Yeah someone else told me about that already but no not exactly. If you try it in studio you get an empty table when you print. Which shouldnt be the case it should have stuff in it.
Can you print LocalPlayer then?
If couldnât print LocalPlayer(Other than unknown and Player named Player), it was the root of problem.
PS: Have you checked this?
When you require() the PlayerModule ModuleScript, it returns the result of the PlayerModule.new() function, or a new PlayerModule instance:
In the .new() function, the PlayerModule sets the properties .cameras and .controls to the CameraModule and ControlModule.
When you run the code with the colon and all, it runs this function, returning whatever is stored in the .cameras index:
If we look at the CameraModule ModuleScript to see what it actually returns, we can see that it returns an empty table if this âFFlagUserRemoveTheCameraApiâ is evaluated as true.
In other words, maybe the problem is that this FFlagUserRemoveTheCameraApi thing is being evaluated as true for some reason. I havenât really looked through the scripts though so I donât exactly know how you could get the result youâre looking for, but you might be able to follow this variable and see what you need to change at some point along that path.
ty ty that did it. Yeah idk what that is either so i just said YOLO and set
local cameraApi = cameraModuleObject
worked perfectly. Thanks