Can you do this?
1 | local function Search(Location, Value) |
2 | if Location [ Value ] then |
3 | local status = “found” |
4 | return (status) |
5 | end |
6 | end |
7 |
8 | local SearchStatus = Search(workspace, Part) |
9 | print (SearchStatus) |
Yes, you can do this. Very useful for classifying objects, too:
01 | function isItLimeGreen(thing) |
02 | if thing.BrickColor = BrickColor.new( "Lime green" ) then |
03 | return "True" |
04 | else |
05 | return "False" |
06 | end |
07 | end |
08 |
09 | local object = game.Workspace:FindFirstChild( "Test" ) |
10 | print ( isItLimeGreen(object) ) |