How to access lighting effects that are held on the Client and not the Server?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!

I want to be able to delete children of Lighting from the client side.

  1. What is the issue? Include screenshots / videos if possible!

So basically I am trying to delete the children of Lighting but I am trying to delete it from the Client Side. The client is the one that houses the lighting effects not the server, so I have made various different local scripts to try to destroy the effects after a certain point but it wont happen.

How exactly do I reach lighting effects that are held by the Client and not the Server?

Lighting should be accessible to clients.
Could you send a script so I don’t overthink what you’re trying to do?

From what I read, the client created the item but you can’t delete it.

Try adding this to the localscript that creates the item in Lighting:

local Item = --path item
local Duration = 5 --in seconds
game:GetService("Debris"):AddItem(Item,Duration)

It’s basically scheduled deletion.

Essentially, the top script adds the effects when touching a part, and the bottom script is what removes all the lighting when a remote event is fired. The effects will not delete though

Move this block inside. That area outside of the OnClientEvent only runs once when the player joins the game. Since the lighting children doesn’t exist yet when you join the game, all of the variables are nil. The variables are never updated so it’ll always be nil. You need to recheck lighting and get the new children every time you want to remove them.

image

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.