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

Can anyone help with destroy and respawn??

Asked by 6 years ago

Im trying to make it where the clone of an object ONLY spawns after one has been destroyed. Sort of like

if Part is destroyed then Part.Clone() spawns

but i can't figure out how to word it for the script. Can anyone please help me?

0
local PartToClone = game.lighting.PartToClone ChronoStrike -7 — 6y
0
Never use Lighting for storage. You should use ReplicatedStorage or ServerStorage saSlol2436 716 — 6y

2 answers

Log in to vote
0
Answered by 6 years ago

Say the part was named "Part". You could dupe it into rep. storage, and then do something like this:

while true do
    if game.Workspace:FindFirstChild("Part") == nil then
        wait(1.5)
        game.ReplicatedStorage.Part:Clone()
        game.Workspace.Part.Position = --Your Position Here
    end
end
0
i tried this, it just keeps making the part disappear seconds after i run the game. I've checked my script to make sure I got everything right. HappyGamerBro -20 — 6y
Ad
Log in to vote
-1
Answered by 6 years ago

Something like that? Might work idk

local PartToClone = game.lighting.PartToClone:Clone() if game.workspace.PartToClone then else PartToClone.Parent = workspace end

Answer this question