So I have sorta a question sorta confused and sorta I’m seeing if this is possible. But lets say you have a script somewhere. And that script changes a parts parent from Workspace to ReplicatedStorage. Would there be a way to prevent that from happening. Like for example could you restrict that action/block it? Or could you find a way to trace it back to what scripted did that action in order to delete it. (For example some backdoor script) Some of the things I explored were stuff like using this below. Just wondering if there was anything or if anyone has some tips for me on things I can/should do.
local part = game.Workspace:FindFirstChild("Part")
part.AncestryChanged:Connect(function(s, parent)
if parent ~= game.Workspace then
part.Parent = game.Workspace
print("bad part. You stay in workspace")
end
end)