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

How do i get all the players in the workspace? [closed]

Asked by 10 years ago

How do I get all the players in the workspace ive tried this but it doesn't work

for i,v in pairs(game.Players:GetPlayers()) do local camera=script.cameraManip:Clone() camera.Parent=v end

Locked by Redbullusa, TheeDeathCaster, and Shawnyg

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

1 answer

Log in to vote
2
Answered by
Merely 2122 Moderation Voter Community Moderator
10 years ago
for i,v in pairs(game.Players:GetPlayers()) do
    local camera = script.cameraManip:Clone()
    camera.Parent = v.Character
end

A player doesn't actually exist in the Workspace. Each player has a "Character" model in the Workspace that has the arms and legs and torso. It represents the physical person in the game.

Ad