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 — 5y

3 answers

Log in to vote
3
Answered by 5 years ago
1local Players = game.Players:GetPlayers()
2for i,v in pairs(Players) do
3v.Charcater -- do stuff with character
4v -- do stuff with player
5end
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

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

Imma post what i would do in this case

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

Answer this question