of     1   

InternInternetIdiot
#152911832Wednesday, December 31, 2014 6:48 PM GMT

Hello, This script isnt working, Its suppose to check the number the player puts in and if the number is e.g 123 then it removes its self and if its anything else nothing happens script.Parent.Submit.MouseButton1Click:connect(function() for i,v in pairs(game.Workspace.idcodes:GetChildren()) do print(v.Value); if script.Parent.ID.Text == v then script.Parent.Parent:remove() end; end end) Thanks! HDTV13 - Chief of BTP Posting failed = 97x64 (Error user logged out)
championbuilder
#152912081Wednesday, December 31, 2014 6:52 PM GMT

change v to v.Value
InternInternetIdiot
#152912298Wednesday, December 31, 2014 6:54 PM GMT

Tried it, Didnt work. Please help Thanks! HDTV13 - Chief of BTP Posting failed = 97x64 (Error user logged out)
InternInternetIdiot
#152912817Wednesday, December 31, 2014 7:00 PM GMT

B1 Thanks! HDTV13 - Chief of BTP Posting failed = 97x64 (Error user logged out)
championbuilder
#152913890Wednesday, December 31, 2014 7:12 PM GMT

are the values in idcodes, StringValues?
InternInternetIdiot
#152914280Wednesday, December 31, 2014 7:16 PM GMT

NumberValue and I've edited the script. I added some prints so i could see what was happening script.Parent.Submit.MouseButton1Click:connect(function() print 'Click' for i,v in pairs(game.Workspace.Policeidcodes:GetChildren()) do print 'GetChildren' local found = v:FindFirstChild("Value") print 'FindFirstChild' if found then print 'found' if script.Parent.ID.Text == found.Value then script.Parent.Parent:remove() print 'remove' end print 'end' end end end) Hears the out put Click GetChildren FindFirstChild GetChildren FindFirstChild GetChildren FindFirstChild GetChildren FindFirstChild It never finds the value Thanks! HDTV13 - Chief of BTP Posting failed = 97x64 (Error user logged out)
championbuilder
#152914603Wednesday, December 31, 2014 7:20 PM GMT

The original script you posted does work, You must be doing something wrong with it.
InternInternetIdiot
#152915376Wednesday, December 31, 2014 7:30 PM GMT

Mhmm, I cant get it to work are you using a text box and an text box then a model in the workspace called idcodes and the values inside called value as numbervalues Thanks! HDTV13 - Chief of BTP Posting failed = 97x64 (Error user logged out)
InternInternetIdiot
#152915541Wednesday, December 31, 2014 7:32 PM GMT

Feel stupid.... Neeeded to use string value not number value. Thanks for your help! Thanks! HDTV13 - Chief of BTP Posting failed = 97x64 (Error user logged out)
championbuilder
#152915904Wednesday, December 31, 2014 7:36 PM GMT

I have a Model in workspace named "idcodes" Workspace -idcodes --Value ---Value = "1" --Value ---Value = "2" --Value ---Value = "3" I then have a button inside ScreenGui in StarterGui StarterGui -ScreenGui --TextButton ---LocalScript Code: script.Parent.MouseButton1Click:connect(function() for i,v in pairs(game.Workspace.idcodes:GetChildren()) do print(v.Value); if script.Parent.ID.Text == v.Value then print("worked") end; end end) ---ID (TextLabel) When I click TextButton, if ID's text ='s one of the values in idcodes ("1","2",or "3), the output prints "Worked"
InternInternetIdiot
#152918741Wednesday, December 31, 2014 8:16 PM GMT

Thanks Thanks! HDTV13 - Chief of BTP Posting failed = 97x64 (Error user logged out)

    of     1