I noticed a few things about your code.
First of all, you are not calling your function in any way, which would make it not run.
Second of all, on line 3, you have put your "then" on the wrong line, your "then" has to be on the second line.
Here is some code that should work for you:
~~~~The following is non-tested code~~~~
This script should go into the "child of the child of the part that is going to be archivable'd"
03 | script.Parent.Parent.Part.Touched:connect( function (hit) |
05 | if not hit.Parent:FindFirstChild( "Humanoid" ) then return end |
07 | if hit.Parent.Name = = "Player1" then |
09 | script.Parent.Parent.Part.Archivable = true |
However, tell me one thing. Why do you want it to be archivable only after a certain player has touched it?
If this answer helped you, make sure you accept my answer!