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)

4 comments
cause you never made player, so it dosent know what player is. Is this in a localscript or normal?
Normal script. How would I create player?
you can easily in LocalScripts - local player = game.Players.LocalPlayer inside a server script you could just do a function of game.Players.PlayerAdded:connect(function(player)
sent an answer, try it out.