Roblox · Захват флага · урок 3
Флаги: базы и модели
Строим две базы: подставку, флаг и зону, куда надо принести чужой флаг.
Структура
Синим — что добавляем на этом уроке.
Workspace
└─ Bases (Folder)
├─ Синие (Model) — имя = имя команды
│ ├─ Stand (Part) — подставка
│ ├─ GivePart (Part) — сюда приносят чужой флаг
│ └─ Flag (Model)
│ ├─ Hitbox (Part) — Anchored вкл., прозрачный
│ │ └─ WeldConstraint ×2 (WeldConstraint) — Hitbox ↔ Pole, Hitbox ↔ Cloth
│ ├─ Pole (Part) — древко
│ └─ Cloth (Part) — полотнище цвета команды
└─ Красные (Model) — то же самое
Шаги
- Поле — на земле под лобби: две базы на противоположных концах, между ними укрытия.
- Флаг: древко «Pole» (0.4 × 8 × 0.4), полотнище «Cloth» цвета команды. Вокруг — прозрачная «Hitbox» размером с флаг (Transparency 1): за неё флаг и хватают.
- Hitbox — Anchored вкл.; Pole и Cloth — Anchored выкл., приварены к Hitbox (WeldConstraint в Hitbox: Part0 Hitbox, Part1 Pole; ещё один — Part1 Cloth).
- У всех трёх: CanCollide выкл., Massless вкл. — флаг не мешает бежать и ничего не весит.
- Hitbox + Pole + Cloth → модель «Flag». Под флагом — подставка «Stand».
- «GivePart» — плоская зона цвета команды рядом с базой: сюда игрок приносит вражеский флаг.
- Stand + Flag + GivePart → модель с именем команды: «Синие». Копия для красных — «Красные». Обе в папку «Bases».
- Точки «GameSpawn» поставь у своих баз.
Проверка
Запусти Play (или Run) и убедись:
- Play: флаги стоят на подставках и не падают.
- Сквозь флаг можно пройти (CanCollide выкл.).
- Имена баз совпадают с именами команд.
Roblox · Capture the flag · lesson 3
Flags: bases and models
We build two bases: a stand, a flag and a zone where the enemy flag must be brought.
Structure
Blue — what we add in this lesson.
Workspace
└─ Bases (Folder)
├─ Синие (Model) — name = team name
│ ├─ Stand (Part) — the stand
│ ├─ GivePart (Part) — the enemy flag is brought here
│ └─ Flag (Model)
│ ├─ Hitbox (Part) — Anchored on, transparent
│ │ └─ WeldConstraint ×2 (WeldConstraint) — Hitbox ↔ Pole, Hitbox ↔ Cloth
│ ├─ Pole (Part) — the pole
│ └─ Cloth (Part) — a cloth in the team's color
└─ Красные (Model) — the same
Steps
- The field is on the ground below the lobby: two bases at opposite ends with cover between them.
- Flag: a pole "Pole" (0.4 × 8 × 0.4) and a cloth "Cloth" in the team color. Around them a transparent "Hitbox" the size of the flag (Transparency 1): that's what players grab.
- Hitbox is Anchored on; Pole and Cloth are Anchored off and welded to Hitbox (a WeldConstraint in Hitbox: Part0 Hitbox, Part1 Pole; another one with Part1 Cloth).
- All three: CanCollide off, Massless on — the flag doesn't slow you down and weighs nothing.
- Hitbox + Pole + Cloth → a model "Flag". Under the flag a stand "Stand".
- "GivePart" is a flat zone in the team color next to the base: the player brings the enemy flag here.
- Stand + Flag + GivePart → a model named after the team: "Синие". A copy for red — "Красные". Both go into a folder "Bases".
- Place the "GameSpawn" points at their bases.
Testing
Press Play (or Run) and make sure:
- Play: the flags stand on their stands and don't fall.
- You can walk through a flag (CanCollide off).
- Base names match team names.