Whenever I run this in studio everything works perfect and resets the values, but if I run it by going to the place and clicking Play. It doesn't reset any values.
reset.MouseButton1Down:connect(function()
for i,v in pairs(game.Players:GetPlayers()) do
for k,val in pairs(v.leaderstats:GetChildren()) do
if val:IsA("IntValue") then
val.Value=0
elseif val:IsA("StringValue") and val.Name=="Promotion" then
val.Value="No"
end
end
end
end)
Part of a larger code.
