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

How do I get this part to clone in the exact same place?

Asked by 3 years ago

So I have this part that falls when you touch it, for an obby. But I want it to clone in the exact same place after 3 seconds so if you die you can do it again. What do I do? code:

script.Parent.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid")then script.Parent.Anchored = false end end)

wait(3)

also btw my powers about to go off so.. But I will respond after it comes back on.

1 answer

Log in to vote
0
Answered by 3 years ago
01local part = script.Parent --your part, i just made a variable for it
02local origPos = part.Position --we're just saving your part's position for later use
03 
04local debounce = false --i also added debounce
05 
06part.Touched:Connect(function(hit)
07    if hit.Parent:FindFirstChild("Humanoid") and not debounce then
08        local clonedPart = part:Clone() --clones our part
09 
10        debounce = true
11 
12        part.Anchored = false
13 
14        wait(3)
15 
View all 22 lines...

Hoping you learned something! <3

0
thx a_crazyjester 21 — 3y
0
it didnt work .-. a_crazyjester 21 — 3y
Ad

Answer this question