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

How do i clone parts with a script, but make the original part uneffected?

Asked by 2 years ago

so i need to clone a part. it needs to have a script which removes the part after 6 seconds, but i want the original part to stay (not to get removed) any ideas?

1 answer

Log in to vote
0
Answered by 2 years ago

hello, the question is a bit confusing but i understanded it like: you clone a part, and the cloned part will remove after 6 seconds. very simple though, you need to use the :Clone function

local Part = game.Workspace.Part --make your variable a part, so you can access it
local Part2 = Part:Clone() -- then make a variable for your future cloned part, and make a "host" for it
wait(?)
Part2:Destroy()

and thats it

0
woops, sorry i forgot that you wanted to set it to 6 seconds and putted inside ? thinking you would like set your prefered time Artemiygogolev 23 — 2y
0
and you can also put any more settings, like you can change its color, material, make it clone again, etc Artemiygogolev 23 — 2y
0
I recommend using the Debris (https://create.roblox.com/docs/reference/engine/classes/Debris) service or task.delay() (https://create.roblox.com/docs/reference/engine/libraries/task#delay) instead of halting the script entirely. COUNTYL1MITS 312 — 2y
Ad

Answer this question