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.
01 | local part = script.Parent --your part, i just made a variable for it |
02 | local origPos = part.Position --we're just saving your part's position for later use |
03 |
04 | local debounce = false --i also added debounce |
05 |
06 | part.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 |
Hoping you learned something! <3