I made a system where if the thing that is being throwed will dissappear after a few seconds and it will be destroyed, however I don’t want the script that is inside of the thing that is being throwed to end because it waits 4 seconds until it makes the player they hit get back up and everytime the script is still destroyed it would stop waiting and the ragdoll still stays.
The proper way to do it would be to put the script somewhere else. That would also give you the benefit of more reliable control over what happens with the thrown object in case something goes wrong.
Not in a way that would be future-proof. You might be able to find some hacky glitch or something that will work, but you won’t have any guarantee that Roblox won’t break that functionality later. It’s worth it to redo it.
work? It’d probably disrupt the current thread of the script but it’d continue running
Sorry I didn’t read the thread fully. You can do something like this:
Ancestor.Destroying:Connect(function()
Ancestor.Path.To.Script.Parent = SafePlace
-- make it a variable so its easily changeable, and set it to the new parent
dependentObjectVariable = dependentObjectVariable.Parent
end)
This would keep everything relative to your new parent, omitting the need for a solution other than moving the parent