I'm basic scripter, I don't really have knowledge of scripting names, vocabularies. On this function, I'm not sure what to add the last of function
Is it script.Parent.Changed:connect(replace)?
I'm sure Changed is normally for Values, but what about this one? Touched? Or? Please help me!! :(
function replace()
if script.Parent.Parent.TKDoorOutside:FindFirstChild("Explosion") then
workspace.NationalAssemblyAlarm.Toggle.Value = true
wait(1)
script.Parent.Parent.TKDoorOutside:Destroy()
wait(1)
game.ServerStorage.TKDoorOutside:Clone().Parent = game.workspace
end
end
script.Parent.Touched:connect(replace)

2 comments
Explain what you are trying to accomplish. What is this code that you have posted here? What does it do now? How is that different from what you want?
When TKDoorOutside have a child of explosion, then I want it to regen instead part touched it.