# SAvatar

**الأعضاء** 6

|       |                       |                   |
| ----- | --------------------- | ----------------- |
| خاصية | [ID](#id)             | Avatar's ID       |
| خاصية | [Position](#position) | Avatar's position |
| خاصية | [Velocity](#velocity) | Avatar's Velocity |
| خاصية | [Rotation](#rotation) | Avatar's Rotation |
| خاصية | [Username](#username) | Avatar's Username |
| خاصية | [Title](#title)       | Avatar's Title    |

## الخصائص

### ID

int ID {get; }

Avatar's ID

مثال

**Lua**

```lua
ID = Space.Scene.Avatars[1].ID

```

**Lua**

```lua
--server script that prints a list of IDs of players online whenever someone joins
function OnAvatarJoin(id)
  local numOfAvatars = Space.Scene.ConnectedAvatars

  for num =1 , numOfAvatars, 1 do
    Space.Log(Space.Scene.Avatars[num].ID)
  end
end

```

### Position

Vector3 Position {get; }

Avatar's position

مثال

**Lua**

```lua
ID = Space.Scene.Avatars[1].Position

```

**Lua**

```lua
--server script that prints a list of Positions of players online whenever someone joins
function OnAvatarJoin(id)
  local numOfAvatars = Space.Scene.ConnectedAvatars

  for num =1 , numOfAvatars, 1 do
    Space.Log(Space.Scene.Avatars[num].Position)
  end
end

```

### Velocity

Vector3 Velocity {get; }

Avatar's Velocity

مثال

**Lua**

```lua
ID = Space.Scene.Avatars[1].Velocity

```

**Lua**

```lua
--server script that prints a list of Velocitys of players online whenever someone joins
function OnAvatarJoin(id)
  local numOfAvatars = Space.Scene.ConnectedAvatars

  for num =1 , numOfAvatars, 1 do
    Space.Log(Space.Scene.Avatars[num].Velocity)
  end
end

```

### Rotation

Quaternion Rotation {get; }

Avatar's Rotation

مثال

**Lua**

```lua
ID = Space.Scene.Avatars[1].Quaternion 

```

**Lua**

```lua
--server script that prints a list of Rotations of players online whenever someone joins
function OnAvatarJoin(id)
  local numOfAvatars = Space.Scene.ConnectedAvatars

  for num =1 , numOfAvatars, 1 do
    Space.Log(Space.Scene.Avatars[num].Rotation)
  end
end

```

### Username

string Username {get; }

Avatar's Username

مثال

**Lua**

```lua
ID = Space.Scene.Avatars[1].Username

```

**Lua**

```lua
--server script that prints a list of Usernames of players online whenever someone joins
function OnAvatarJoin(id)
  local numOfAvatars = Space.Scene.ConnectedAvatars

  for num =1 , numOfAvatars, 1 do
    Space.Log(Space.Scene.Avatars[num].Username)
  end
end

```

### Title

string Title {get; }

Avatar's Title

مثال

**Lua**

```lua
ID = Space.Scene.Avatars[1].Title

```

**Lua**

```lua
--server script that prints a list of Titles of players online whenever someone joins
function OnAvatarJoin(id)
  local numOfAvatars = Space.Scene.ConnectedAvatars

  for num =1 , numOfAvatars, 1 do
    Space.Log(Space.Scene.Avatars[num].Title)
  end
end

```
