hello im having a problem with making a script that checks for a value from the player leaderstats and if its more then 1 it does its thing,but my problem is that the value is aways the starter value when the player loads even if it changes and it is changed it doesnt show in the script and it prints 0 (the number it thinks the value is) heres the script
local plr = game.Players.LocalPlayer
local pack = plr.leaderstats.Potatopack1.Value
local repstorage = game:GetService("ReplicatedStorage")
script.Parent.MouseButton1Click:Connect(function()
if pack >= 1 then
pack = pack-1
script.Parent.Parent.Visible = false
repstorage.potatopack11:FireServer(plr)
else print(pack)
end
end)