Skip to content

Commit

Permalink
Sync AG-Chassis
Browse files Browse the repository at this point in the history
  • Loading branch information
parker02311 authored Aug 13, 2024
1 parent 460e02f commit 68c2033
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/ExportTemplates/EVCPlugin_AG.luau
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 68c2033

Please sign in to comment.