Here is the script:
is stops at "Finished!" and doesn't add value to the leaderstats
function onClicked() if game.Workspace.dish5.Transparency==0 then wait(.6) script.Parent.Name=("Washing..") game.Workspace.dish1.Transparency=1 wait(.4) game.Workspace.dish2.Transparency=1 wait(.4) game.Workspace.dish3.Transparency=1 wait(.4) game.Workspace.dish4.Transparency=1 wait(.4) game.Workspace.dish5.Transparency=1 wait(2) script.Parent.Name=("Finished!") player.leaderstats["Trinket Dust"].Value = player.leaderstats["Trinket Dust"].Value + 5 wait(2) script.Parent.Name=("Wash Dishes") end end script.Parent.ClickDetector.MouseClick:connect(onClicked)
game.Players.PlayerAdded:connect(function(player) function onClicked() if game.Workspace.dish5.Transparency==0 then wait(.6) script.Parent.Name=("Washing..") game.Workspace.dish1.Transparency=1 wait(.4) game.Workspace.dish2.Transparency=1 wait(.4) game.Workspace.dish3.Transparency=1 wait(.4) game.Workspace.dish4.Transparency=1 wait(.4) game.Workspace.dish5.Transparency=1 wait(2) script.Parent.Name=("Finished!") player.leaderstats["Trinket Dust"].Value = player.leaderstats["Trinket Dust"].Value + 5 wait(2) script.Parent.Name=("Wash Dishes") end end script.Parent.ClickDetector.MouseClick:connect(onClicked) end)
Try this. If it works please rate and accept answer for others with the problem.