You seem to only make the function that kills the player if he's not the owner. Let's make then the other function:
local owner = script.Parent.Parent.Parent.Owner
local door = script.Parent
function onTouched(hit)
local character = hit.Parent
local plr = game.Players:GetPlayerFromCharacter(character)
if plr and plr.Name ~= owner.Value then
character:BreakJoints()
elseif plr and plr.Name == owner.Value then
script.Parent.CanCollide = false
script.Parent.Transparency = 0.5
wait(1)
script.Parent.CanCollide = true
script.Parent.Transparency = 0
end
end
door.Touched:connect(onTouched)
As you see, I added an elseif statement which checks if it's the owner. If it is, then the door turns uncollidable which means he can go through. I also turn it transparent to not seem he's crossing a solid wall. Hope this helped!