From 68c2033b90e2d9a9de6d4e8ad50c590ba963c86a Mon Sep 17 00:00:00 2001 From: Parker <35582919+parker02311@users.noreply.github.com> Date: Tue, 13 Aug 2024 12:45:12 -1000 Subject: [PATCH] Sync AG-Chassis --- src/ExportTemplates/EVCPlugin_AG.luau | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/ExportTemplates/EVCPlugin_AG.luau b/src/ExportTemplates/EVCPlugin_AG.luau index 348252b..75dba05 100644 --- a/src/ExportTemplates/EVCPlugin_AG.luau +++ b/src/ExportTemplates/EVCPlugin_AG.luau @@ -276,12 +276,24 @@ local function registerRotator(lightName: string) motor:SetAttribute("C1", motor.C1) motor.Parent = motorPart + for i, v in pairs(lightParts[lightName]:GetChildren()) do + if v:IsA("WeldConstraint") and v.Part1 == car.DriveSeat then + v:Destroy() + end + end + for i, v in pairs(car.DriveSeat:GetChildren()) do if v:IsA("Weld") and v.Part1 == lightParts[lightName] then v:Destroy() end end + for i, v in pairs(JointsService:GetDescendants()) do + if v:IsA("Weld") and v.Part1 == lightParts[lightName] then + v:Destroy() + end + end + motorPart.Parent = lightbar end end @@ -295,6 +307,7 @@ local function registerFader(lightPart: BasePart) for _, v in pairs(lightPart:GetDescendants()) do if v:IsA("GuiObject") then + v:SetAttribute("defaultTransparency", v.ImageTransparency) table.insert(data.lightos, v) elseif v:IsA("Light") then v:SetAttribute("defaultBrightness", v.Brightness) @@ -581,6 +594,12 @@ for _, func in pairs(moduleStore:GetChildren()) do faderTable.tween.Completed:Wait() if temporaryConnection ~= nil then temporaryConnection:Disconnect() + for _, lighto in pairs(fader.lightos) do + lighto.ImageTransparency = lighto:GetAttribute("defaultTransparency") + end + for _, light in pairs(fader.lights) do + light.Brightness = light:GetAttribute("defaultBrightness") + end end end end