Hello,
I want to make a remake of Dodge The Teapots of Doom game, and I need to clone a part and delete it after 10 seconds using Debris. In which I can’t seem to do.
I’ve done a while true do loop, then adding it waiting 10 seconds and deleting it, but it doesn’t keep repeating, since I need it to repeat WHILE its repeating. I’ve tried doing Debris but I guess I can’t set the parent of something when using Debris.
Here’s my script when I use debris:
local kettle = game.ServerStorage:WaitForChild("EvilKettle")
local debris = game:GetService("Debris")
while true do
wait(1)
local EvilKettle = kettle:Clone()
EvilKettle.Anchored = false
EvilKettle.CanCollide = true
EvilKettle.CFrame = script.Parent.CFrame
wait(4)
debris:AddItem(EvilKettle, 10)
end
I was thinking of using coroutine but I am not entirely sure if I should use it yet. I will wait for replies and see.
Anything helps.