MouseClick function dosent work

so i made this is

script.Parent.MouseClick:Connect(function(player)
player.leaderstats.Money.Value = player.leaderstats.Money.Value +120

player.leaderstats.Noobs.Value = player.leaderstats.Noobs.Value +1
wait(0.002)
script.Parent.Parent.Parent:Destroy()
wait(5)
script.Parent.Parent.Parent:Clone()
wait(0.001)

end)

and when i click on it it works but when i wait 5 seconds

its dosent Clone and i get and error
halp

The Parent does not exist because you actually destroyed the instance 2 lines above! When you destroy something it is completely gone, so you wont be able to use it again (… or clone, in your case).

Maybe try keeping a backup in ReplicatedStorage, and cloning it when you need it again :slight_smile:

1 Like

Thanks! for the reply im not a good scripter, but i really think that in replicated storage it will works! Anyways Thanks!