This is just a general scripting question to which I need the answer to be an example script.
None of my scripts currently need it, I am just preparing.
This is just a general scripting question to which I need the answer to be an example script.
None of my scripts currently need it, I am just preparing.
I’d simply go with something like this.
Script : ServerScriptService
Local players = game:GetService("Players")
for _, player in pairs(players:GetPlayers()) do
local value = player.Character:FindFirstChild("Your_Value")
if value then
value.Value = not value.Value
end
end
Question: why is i replaced with an underscore?
Because i is not used, whenever you use an underscore it means its an unused variable.
Ah, I see now. Thank you!!! (Keys)
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.