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

How do I call all Workspace Players?

Asked by 5 years ago

I cannot work out how to find the Players in Workspace

1
Why not just do game.Players:GetPlayers()? Unless you're doing something specific with the players? DeceptiveCaster 3761 — 5y
0
how would that work if i want to change their humanoid properties karesiku 72 — 5y
1
player.Character DeceptiveCaster 3761 — 5y
0
sorry for never accepting an answer, came back just a while ago and noticed this and answered it karesiku 72 — 4y

3 answers

Log in to vote
3
Answered by 5 years ago
local Players = game.Players:GetPlayers()
for i,v in pairs(Players) do
v.Charcater -- do stuff with character
v -- do stuff with player
end
0
charcater ihatecars100 502 — 5y
Ad
Log in to vote
0
Answered by
EDLLT 146
5 years ago
Edited 5 years ago

There you go bud

for _,character in pairs(game.Players:GetPlayers()) do
    character:WaitForChild("Humanoid").WalkSpeed=100 -- Block of code here.
end
Log in to vote
0
Answered by
le145 20
5 years ago

Imma post what i would do in this case

for i,players in pairs(game.Players:GetChildren())do
    local myPlayerWork = workspace:FindFirstChild(players.Name)
    if myPlayerWork then
        --This to do with the character
    end
end

Answer this question