Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to import another Player's Numbervalue to compare it to the Localplayer's?

Asked by 3 years ago
local Teams = game:GetService("Teams")
local RS = game:GetService("RunService")

RS.Stepped:Connect(function()
    for i, player in pairs(game.Players:GetChildren()) do
        local playerGui = player:WaitForChild("PlayerGui")
        local Chance = playerGui:WaitForChild("HomeGui"):WaitForChild("IntermBackFrame").Chance_Notify.ChancePTS

    end
end)

im basically trying to compare one player's number value to another player's number value. if their number value is greater, then they will get placed into a special team.

My roadblock, or where I am getting lost is how I would actually import the other player's number value into my script, so I can perform the necessary to compare them.

Any ideas on how I can get passed? (ChancePTS is a number value)

1
Use :GetPlayers() instead of :GetChildren(), and use :GetService("Players") instead of .Players, it gives me OCD just seeing that. CrastificeDude612 71 — 3y

Answer this question