Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I detect if a part is gone , destroyed , non existing anymore?

Asked by 4 years ago
Edited 4 years ago

Like when I :destroy() it the script should be looping around and when it detects that the part is not there then it will trigger and command to regen it but now I just need the script and explanation that detects it.

This is what I worked out.

local part = workspace:FindFirstChild("part")

if not part then

1 answer

Log in to vote
0
Answered by
Gingerely 245 Moderation Voter
4 years ago

So you would do, If this helped please mark it as Answered!

if not game.Workspace.MyPart then
wait()
-- Type in your command here :)
end
Ad

Answer this question