Whenever I try entering the door it would kill me and not let me in. Whats the problem here?
local Door = script.Parent
local enter = 'duckyo01', 'Player'
script.Parent.Touched:connect(function(hit)
if hit.Parent then
local hum = hit.Parent:FindFirstChild('Humanoid')
if hum then
if hum.Name == enter then
Door.Transparency = 0.5
Door.CanCollide = false
else
hum.Health = 0
end
end
end
end)

2 comments
Just posting code with very little explanation isn't going to help anyone.
^ #hatersgonnahatepotatoesgonnapotate