Lighting - Access & Replication

Topic. Doesn’t seem like I can find a reliable answer for this right now.

My two questions are:

  1. Is the client able to access children of lighting?
    I’d like the client to be able to place skyboxes or remove them on request.

  2. Do the children of Lighting replicate?
    If a client makes a change to the sky, I wish not for others to see it.

I know that properties of Lighting don’t replicate with FilteringEnabled on but I’m not too sure about its children. What I’d like to accomplish at the moment is switching skyboxes only for one player and no one else - this way, I can effectively create multiple systems on the client, such as

  • Cinematics (should be done on the client, never on the server, unless a multiplayer game)
  • Local gameplay in a server of many others

This is all going into a game with a maximum of 1 player so I shouldn’t be too concerned and could handle this server-side, but better to learn now for the future. I also have a habit of making my code “look right”, player maximum regardless.

1 Like

With filtering enabled on, nothing in lighting replicates between clients, children or properties

4 Likes

Expanding on what ColdSmoke said, any non-exempt child of any service does not accept replications Client->Server across FE.

To add on to this: It seems like Lighting acts like ReplicatedStorage/Workspace/otherReplicatingServices:

  • When you change/add/remove something on the server, it replicates to all clients
  • When you change/add/remove something on the client:
    • With FilteringEnabled: Only the client sees the change (doesn’t replicate)
    • No FilteringEnabled: It replicates to the server (and thus all other clients)
3 Likes