local frame2searchbox1 = Instance.new("TextBox",frame2)
frame2searchbox1.Size = UDim2.new(.75,0,.15,0)
frame2searchbox1.Position = UDim2.new(.125,0,0,0)
frame2searchbox1.Name = "SearchChildrenBox"
frame2searchbox1.BackgroundColor3 = Color3.new(1,1,1)
frame2searchbox1.Text = "Enter Where to search here - Ex. game.Workspace"
frame2searchbox1.TextScaled = true
local frame2searchbox1val = Instance.new("StringValue",frame2searchbox1)
frame2searchbox1.Changed:Connect(function()
frame2searchbox1val.Value = frame2searchbox1.Text
frame2searchbox1val.Name = "Value"
end)
local function searchfunction1(text)
for i,v in (text:GetChildren())do
print(v.Name)
wait(.1)
end
end
local frame2searchbutton1 = Instance.new("TextButton",frame2)
frame2searchbutton1.Size = UDim2.new(.75,0,.15,0)
frame2searchbutton1.Position = UDim2.new(.125,0,0.15,0)
frame2searchbutton1.Name = "SearchChildren"
frame2searchbutton1.BackgroundColor3 = closebutton.BackgroundColor3
frame2searchbutton1.Text = "Find Children"
frame2searchbutton1.Activated:Connect(function()
local text = frame2searchbox1.Value.Value
print "Searching.."
print"==========================="
searchfunction1(text)
end)
Basically all i want to do is make a button that when clicked it will print the children of whatever is typed in the box for example game.Workspace
