This is my leaderstats script. If the value of one of the leaderstats is less than 10, it is supposed to add the value of another leaderstat to the value of another leaderstat. It doesn't work for whatever reason. Does anyone know why? Here is my code:~~~~~~~~~~~~~~~~~ while wait(180) do for _, player in ipairs(game.Players:GetPlayers()) do if player:FindFirstChild("leaderstats") then if playerLeaderstats.subscribers.Value = <10 then player.leaderstats.views.Value = player.leaderstats.views.Value + player.leaderstats.videos.value end end end
~~~~~~~~~~~~~~~~~
The bug is simple to spot, Because you're using the comparative operator "<=" wrong, you wrote " =< ".
while wait(180) do for _, player in pairs(game.Players:GetPlayers()) do if player:FindFirstChild("leaderstats") then if playerLeaderstats.subscribers.Value <=10 then player.leaderstats.views.Value = player.leaderstats.views.Value + player.leaderstats.videos.value end end end end