There was a topic with a similar name to this one but a different implementation altogether. My issue is that I have tried and failed to come up with a way to get the number of players.
local workSpace = game:GetService("Workspace")
local teams = game:GetService("Teams")
local playersHolder = {}
while true do
if workSpace.Point1.pole1.BrickColor.Name == "Navy blue" and workSpace.Point2.pole2.BrickColor.Name == "Navy blue" then
local playersCrips = teams.Crips:GetPlayers()
for i, v in pairs(playersCrips)do
if v:FindFirstChild("leaderstats") and v then
v.leaderstats.Points.Value = v.leaderstats.Points.Value + 10
table.insert(playersHolder, v)
v.PlayerGui.ScreenGui.PointsDisplay.PointsCrips.Text = v.PlayerGui.ScreenGui.PointsDisplay.PointsCrips.Text * #playersHolder
end
end
You can ignore the lack of ends towards the end there, this is part of a much larger script. The other parts of the script have already been tested and work fine. You can see that I tried to get the number of players by placing it into a table, but that doesn’t seem to work.