Workspace.StaffDoor.Part.Script:7: attempt to index nil with 'Parent'
local door = script.Parent
local team = "Pharmacist"
door.Touched:connect(function(plr, hit)
print(hit)
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid then
if plr.Team == game.Teams[team] then
door.CanCollide = false
door.Transparency = 0.5
wait(1)
door.CanCollide = true
door.Transparency = 0
end
end
end)
it prints nil
