for i, v in pairs(game.Lighting:GetChildren()) do v.Parent = game.Players.LocalPlayer.Backpack end
COMMUNITY QUESTION
How Would I MakeIt Specific like a certain item?
1 answer
If you're trying to get a specific item, here's some example code:
local ToolName = "Sword" -- Change this to your tool name
local FindTool = game:GetService("Lighting"):FindFirstChild(TooName)
if FindTool then -- If we find a child named "Sword" in Lighting
FindTool.Parent = game.Players.LocalPlayer.Backpack -- changes the parent to the Player's backpack, but I suggest using remoteevents
end
This code will check if there's a child named ToolName, "Sword", in game.Lighting. If there is, it will change the child's parent to the LocalPlayer's backpack. Else, the script will return/end.
Hope this helps!
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Code block
What do you mean?