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)

1 comment

0

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