Can anyone give me like a short explanation of character and how to get every character in the server. Just at least a short tutorial on character will do
✓ ANSWER ACCEPTED
Can anyone explain character?
1 answer
✓ Accepted answer
A character is the model of the player located in Workspace and can experience physical objects and jump. It contains the humanoid and body parts. The player has the backpack, leaderstats, and is the one connected to the server. You can get the character in a variety of ways. Here are some:
-- For localscript
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
-- either finds the character or waits for it to load in
For script
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
wait(2) -- cooldown for character to load in
end)
end)
For more information go here: https://developer.roblox.com/en-us/api-reference/property/Player/Character/index.html
To get every character:
local players = game:GetService("Players")
for _, player in pairs(players:GetChildren()) do
if player:IsA("Player") then
-- unneeded line
local char = player.Character or player.CharacterAdded:Wait()
end
end
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Character of what? You should also check out the developer wiki http://developer.roblox.com/