So im trying to make sorta like a dungeon crawler, but i need the door to open after the npc dies. This is my attempt the door opening script.
script.Parent.Transparency = 0.5
script.Parent.CanCollide = false
wait(1)
script.Parent.Transparency = 0
script.Parent.CanCollide = true
and this is the script i made to open the door when the npc dies.
local part1 = game.Workspace.part1
local part2 = part1.you.Disabled
function door()
local hp = script.Parent.Health
if hp <1 then
part2 = false
end
script.Parent.Died:Connect(function(door)
(part 1 is the door) (the door opening script is disabled) (the second script is supposed to enable the first script when the npc dies) (i put the second script in the npc's humanoid)

4 comments
I LITTERALY JUST SOLVED IT RIGHT BEFORE U ANSWERED XD
hmm my answer was a little different tho but i guess i can try yours
If you don't mind sharing what was the solution you came up with?
sure im gonna post it as an answer ok?