I made this code which destroys a Clickdetector in the scripts parent and then clones the Clickdetector but the destroying part works but not the cloning part to then create back the clickdetector.
My Code:
local click = script.Parent.ClickDetector --or wherever it is click.MouseClick:Connect(function(player) script.Parent.ClickDetector:Destroy() wait(20) script.Parent.ClickDetector:Clone() end)
Thank You and Help is Appreciated
local click = script.Parent.ClickDetector --or wherever it is* local Cloned = click:Clone() click.MouseClick:Connect(function(player) Cloned.Parent = game.Workspace --This put the "Clone" of "click" in the Workspace click:Destroy() wait(20) Cloned.Parent = script.Parent end)
I haven't try that script but it should work.
local click = script.Parent.ClickDetector click.MouseClick:Connect(function(player) local ClickClone = click:Clone() ClickClone.Parent = game.ReplicatedStorage click:Destroy() wait(20) ClickClone.Parent = script.Parent end) -- Bingo Bongo.