a=script.Parent.Parent.Door
function onTouch(hit)
print(hit)
if hit.Parent.IntValue.Value==2 then a.Transparency=1
script.Parent.BrickColor=BrickColor.new("Lime green")
a.CanCollide=false
wait(3)
a.Transparency=0.6
a.CanCollide=true
script.Parent.BrickColor=BrickColor.new("Really red")
end
end
script.Parent.Touched:connect(onTouch)
So basically the point of this creation is to get the tool, and if the tool has an IntValue inside of it with a value of 2, the door is supposed to open. However it just sends a message back saying IntValue is not a valid member of model, I even tried using simply just Value. Please help?

1 comment
You have to actually index the tool. 'hit.Parent' is the potential Character.