Due to exploiters I needed to enable filtering. But the group leaderboard broke then I enabled it, now I did some research on filtering enabled and how to make scripts with it on but I just can't seem to figure out how to. Does anybody know how to fix the leaderboard with filtering enabled?
game.Players.PlayerAdded:connect(function(P)
repeat wait() until P:findFirstChild("leaderstats")
local Rank = Instance.new("StringValue", P.leaderstats)
Rank.Name = "Rank"
Rank.Value = P:GetRoleInGroup(494936)
end)

1 comment
All I know is local scripts do not activate in the actual server, but only on the player's computer. Essentially no one else will be affected by the changes your local script makes to the game.