Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make shop script stop using starting value?

Asked by 5 years ago

I was making a shop script and confronted a problem, When the script checks the player's score, it uses it's starting value(which is 0). I attempted everything I possibly could and was unable to fix the problem or determine it is Bringing any light to the situation would be genuinely helpful, Thank you

here's the script for anyone willing to help

script.Parent.ClickDetector.MouseClick:Connect(function(plr)

    if plr:WaitForChild("leaderstats"):WaitForChild("Score").Value > 99 then

        game.ReplicatedStorage.BuyC2:Fire(plr.Name)

         plr:WaitForChild("leaderstats"):WaitForChild("Score").Value = 100

    end

end)
0
Is this a localscript or normal script? Tokyo7979 131 — 5y

Answer this question