CarBody: sculpted per-car visual body kits (cars-first priority)
CI / quality (push) Successful in 1m5s

- New src/server/CarBody.luau: wedge noses, raked glass, pop-up lights (RX-7),
  spoilers (lip/wing/GT), tail styles, exhaust tips, underglow, accent neon,
  alloy rims. All parts Massless+welded: zero physics impact.
- CarManager: replaced the old glass-cube cabin with CarBody.build().
This commit is contained in:
2026-07-22 08:50:19 -04:00
parent 0fc0d0ae22
commit e0bee80795
2 changed files with 451 additions and 14 deletions
+7 -14
View File
@@ -29,6 +29,7 @@ local Cars = require(Shared.Cars)
local Chassis = require(Shared.Chassis)
local GameConfig = require(Shared.GameConfig)
local DataManager = require(script.Parent.DataManager)
local CarBody = require(script.Parent.CarBody)
type Car = Cars.Car
type Tuning = Chassis.Tuning
@@ -208,20 +209,9 @@ local function buildCarModel(car: Car, tuning: Tuning): Model
ballastWeld.Part1 = ballast
ballastWeld.Parent = body
-- Cabin (visual only) -------------------------------------------------------
local cabin = makePart({
Name = "Cabin",
Size = Vector3.new(5, 1.6, 5),
CFrame = origin * CFrame.new(0, 1.5, 0.5),
Color = Color3.new(car.Color[1] * 0.7, car.Color[2] * 0.7, car.Color[3] * 0.7),
Material = Enum.Material.Glass,
CanCollide = false,
Parent = model,
})
local cabinWeld = Instance.new("WeldConstraint")
cabinWeld.Part0 = body
cabinWeld.Part1 = cabin
cabinWeld.Parent = body
-- Visual bodywork (nose, glass, spoilers, lights, underglow, rims) is added
-- by CarBody.build() after assembly. All CarBody parts are Massless, so
-- they never alter the chassis physics.
-- Seat: input device only (Throttle/Steer). It drives nothing directly. -----
local seat = Instance.new("VehicleSeat")
@@ -247,6 +237,9 @@ local function buildCarModel(car: Car, tuning: Tuning): Model
end
end
-- Sculpted visual body kit (per-car styling; all parts Massless + welded)
CarBody.build(model, body, car)
model.PrimaryPart = body
return model
end