local user = "doctorbenny2011" -- change this to the name of the person the personal door belongs to
local door = script.Parent
local doorTransparency = door.Transparency
function onTouched(hit)
local character = hit.Parent
if character:FindFirstChild("Humanoid") then
if string.lower(hit.Parent.Name) == string.lower(user) then
script.Parent.CanCollide = false
script.Parent.Transparency = 0.4
wait(2) -- The length of time you want the door to be open for
script.Parent.CanCollide = true
script.Parent.Transparency = 0
else
-- remove this line if you want a non-killing door
end
end
end
script.Parent.Touched:connect(onTouched)
COMMUNITY QUESTION
Why won't this work?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Did you place your clearly free-modeled script as the door's child?