Skip to content

Commit 96ace46

Browse files
authored
Merge pull request #11 from nestenes/master
Attributes are now carried over during conversion.
2 parents 3208f88 + febf262 commit 96ace46

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

buildPlugin.rbxl

23.8 KB
Binary file not shown.

src/Converter.lua

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Converter.SearchCache = false -- TODO: Try enabling cache
1313
Converter.ServiceNameMap = setmetatable({}, {
1414
__index = function(self, className)
1515
local isService = className:find("Service$")
16-
or className:find("Provider$")
17-
or className:find("Settings$")
16+
or className:find("Provider$")
17+
or className:find("Settings$")
1818

1919
if not isService then
2020
-- Try to find the service
@@ -545,6 +545,10 @@ function Converter:ChangeClass(object, ClassName)
545545
for _, Tag in pairs(CollectionService:GetTags(object)) do
546546
CollectionService:AddTag(newObject, Tag)
547547
end
548+
-- Attribute instance
549+
for AttributeName, AttributeValue in pairs(object:GetAttributes()) do
550+
newObject:SetAttribute(AttributeName, AttributeValue)
551+
end
548552

549553
-- Go through each child and identify properties that point towards the parent that's getting replaced
550554
local oldParent = object.Parent

0 commit comments

Comments
 (0)