In every player theres a boolvalue and i want to change them all true how could i do this?
1 Like
Go through the player’s one by one using a in pairs loop with game:GetService("Players"):GetPlayers()
local players = game:GetService("Players"):GetPlayers()
for _, player in pairs(players) do
--Get the bool value and change the value here
end
1 Like
Loop over each player, find its boolvalue, and change its .Value to true
for _, player in pairs(game.Players:GetPlayers()) do
local playerBool = player:FindFirstChild("BoolValue")
if playerBool then
playerBool.Value = true
end
end
1 Like
Try
for i, v in pairs(game.Players:GetPlayers()) do
if v:FindFirstChild("YOURVALUE") then
v.Value = true
end
1 Like
EEE who gets the solved thing
1 Like
I’d suggest who you want. Not me tho, my post is junky.