The purpose of this code is to run a block of code block. Unfortunately, Nothing happens, no errors. Any ideas on why this doesn't work? Code:
while true do local plr = game.Players.LocalPlayer local pack = plr.Backpack local char = plr.Character local gooey = plr.PlayerGui local value = gooey["ToolMain_"].Value1 wait(.00000001) for p, t in pairs(pack:GetChildren()) do if t.ClassName=="Tool" and t.Parent==pack and value.Value == 1 then t.Parent = char end end end
Your code:
while true do local plr = game.Players.LocalPlayer local pack = plr.Backpack local char = plr.Character local gooey = plr.PlayerGui local value = gooey.ToolMain_.Value wait(.00000001) for p, t in pairs(pack:GetChildren()) do if t.ClassName=="Tool" and t.Parent==pack and value.Value == 1 then t.Parent = char end end end
fixed code:
while true do local plr = game.Players.LocalPlayer local pack = plr.Backpack local char = plr.Character local gooey = plr.PlayerGui local value = gooey["ToolMain_"] wait(.00000001) for p, t in pairs(pack:GetChildren()) do if t:IsA("Tool") and t.Parent==pack and value.Value == 1 then --Oh and if it doesn't work go ahead and try ClassName. t.Parent = char end end end