I want to make a part to reappear after I put remove() on it. How do you make it to where to it reappears after being destroyed?
You can't recover a part once you Destroy() or remove() it. But, you can falsely remove the part by changing it's Transparency property to 1 and changing it's CanCollide property to false (making it invisible and making it so you cant touch/collide with it), here is a script:
--make it disappear script.Parent.Transparency = 1 script.Parent.CanCollide = false --make it reappear again script.Parent.Transparency = 0 script.Parent.CanCollide = true
You can put this into .Touched() functions and whatnot, enjoy!
You can't unremove bricks, but what I would do is:
local brick = part -- whatever the part is called --disappear part.Transparency = 1 -- make the part invisible part.CanCollide = false -- make the player not be able to touch it/just go through it --reappear part.Transparency = 0 -- make the part visible part.CanCollide = true -- make the player be able to touch it/not go through it
I hope this helps! If not then reply, your welcome!
Remember to accept this if this was what you were looking for:
local modelToRespawn = workspace.Part -- le part local respawned = modelToRespawn:Clone() modelToRespawn:Destroy() wait(2) respawned:Clone().Parent = workspace
What I see right now (since this is untested) is, modelToRespawn is the object, its being cloned, renamed as respawned in the start, once the main model is destroyed, the respawned is cloned and put in workspace to replace modelToRespawn!!
Anyways yeah, if you have questions, lmk.