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)