When I create a character, it should stand on a pedestal (it is shown in the photo), but it is always placed next to it. What should I do?
My script:
local function createPlayerClone(userId, trackName)
local pedestal = workspace:FindFirstChild(trackName .. "_Pedestal")
if not pedestal then return end
-- Удаляем старого клона, если есть
if TrackLeaders[trackName] then
TrackLeaders[trackName]:Destroy()
end
-- Создаём модель игрока
local clone = game.Players:CreateHumanoidModelFromUserId(userId)
if clone then
clone.Parent = workspace
clone:SetPrimaryPartCFrame(pedestal.CFrame + Vector3.new(0, 0, 0)) -- Ставим на пьедестал
-- Делаем все части персонажа анкорированными, чтобы они не двигались
for _, part in ipairs(clone:GetDescendants()) do
if part:IsA("BasePart") then
part.Anchored = true
end
end
TrackLeaders[trackName] = clone -- Сохраняем клон в таблице
end
end