✓ Accepted answer
One reason your didn't work was becasuse your Object table was called, but you didn't say list any index that that you wanted. Another way to do your script, if you really wanted it to be a table is like this:
local V = script.Parent.Value
local Model = script.Parent.Parent.Parent
local Object = {
Model["Head"],
Model["Torso"],
Model["Left Arm"],
Model["Left Leg"],
Model["Right Arm"],
Model["Right Leg"]
}
V.Changed:Connect(function(prop)
if V == true then
for i = 1, #Object, 1 do
Object[i].Locked = true
Object[i].Anchored = true
Object[i].Transparency = 1
end
end
end)
If it were me, I would do a much simpler version of what you're doing. It would look like this:
local V = script.Parent.Value
local Model = script.Parent.Parent.Parent
V.Changed:Connect(function(prop)
if V.Value == true then
for Index, Descendant in pairs(Model:GetChildren()) do
if Descendant.Name == "Head" or Descendant.Name == "Torso" or Descendant.Name == "Left Arm" or Descendant.Name == "Left Leg" or Descendant.Name == "Right Arm" or Descendant.Name == "Right Leg" then
Descendant.Locked = true
Descendant.Transparency = 1
Descendant.Anchored = true
end
end
end
end)