So I'm working on a lab game with research points leaderstats. If I'm making a script where a leaderstat needs to be decreased, it decreases not with 20 like I said in the script, but with way more. For example. If I buy a product requires 20 points, I give the player the product, and points are gone, but not the amount of points I gave the script. There's also a new bool instance thing but that works fine.
Here's the script:
script.Parent.MouseButton1Click:Connect(function() local plr = script.Parent.Parent.Parent.Parent.Parent plr.leaderstats.Research.Value = plr.leaderstats.Research.Value - 20 local bool = Instance.new("BoolValue",plr) bool.Value = true bool.Name = "HasTestSubject" end)
It's in a server script. I hope somebody knows what's wrong.

4 comments
I suggest doing game.Players.LocalPlayer instead of local plr = script.Parent.Parent.Parent.Parent.Parent
I can't since it's a server script.
You should put an if statement to see if the player already owns it or use a debounce as ShutokouBattle mentioned
"leaderstats value is doing weird?" lmao