Merge pull request #2 from ObiYKenobi/main

Fixed error regarding roblox.deserializeModel when encountering BASE64 data
This commit is contained in:
2025-09-22 19:27:16 -04:00
committed by GitHub
+4 -1
View File
@@ -32,7 +32,10 @@ end
-- takes in fileContents as a string and deserializes them returning the results of scanForWorkspace() on the deserialized model -- takes in fileContents as a string and deserializes them returning the results of scanForWorkspace() on the deserialized model
function fileContainsWorkspace(fileContents: string): boolean function fileContainsWorkspace(fileContents: string): boolean
local instances = roblox.deserializeModel(fileContents) local success, instances = pcall(function() return roblox.deserializeModel(fileContents) end)
if not success then -- roblox doesn't like seeing <binary> files, so this is a work-around
return string.find(fileContents, "Item class=\"Workspace\"") and true or false
end
return scanForWorkspace(instances) return scanForWorkspace(instances)
end end