Does anyone know how to make it where once u touch a block the lanterns in ur inventory lights stop working I tried to do it by starterpack but it doesn’t change the light because it’s not the one in ur inventory so how would I make the script know what I’m taking about like the lantern inside the players inventory
1 Like
Ehm let me see if I got this right, you have a physical inventory (not gui) that has lanterns in the inventory. Those lanterns contains light effects and by walking on a part you want those lights stop glowing?
In that case start with a touched event, insert the player ID as a attribute into the lights in his or her inventory and then access the player via Players:GetPlayerFromCharacter() and then access it’s user ID
Loop then through workspace:GetDecsendants() and if the object has the player id as an attribute turn it off
2 Likes