Hello! I am working on implementing a “watch” admin command for our game, which features a large map and has streaming enabled to minimize lag. This command allows moderators to monitor users in the game.
Currently, the implementation simply changes the CameraSubject
of the workspace’s current camera to the target player’s humanoid. While this works effectively when players are rendered and within range, the camera fails to switch to the target player when they move a considerable distance away and become unrendered.
Here’s the relevant code snippet for the current implementation:
local function watchTarget(player, target)
local camera = Workspace.CurrentCamera
camera.CameraSubject = target.Character
end
I’ve observed that when a player becomes unrendered, their position and humanoid parts are no longer visible in the workspace, making it impossible to reference their location. To address this issue, I was wondering if it’s feasible to move the camera to the target player’s position, thereby rendering that area while simultaneously unrendering the area where the moderator is executing the command.
I would greatly appreciate any suggestions or modifications to ensure that moderators can still observe unrendered players from a distance. Thank you!