ScreenshotCapture on the documentation explains that it has a property called FilePathString as a property.
Using the ReflectionService to return each property from a ScreenshotCapture proves that FilePathString does not exist
This is not only a documentation issue, as attempting to call FilePathString in the command bar or any script with permissions to run in studio context, crashes Roblox Studio instantly with no chance of recovery.
This script below will crash Roblox Studio without fail:
local CaptureService = game:GetService("CaptureService")
local onCaptureReady = function(result, screenshotCapture)
if result == Enum.ScreenshotCaptureResult.Success and screenshotCapture then
print(screenshotCapture.FilePathString) -- Line that crashes
end
end
CaptureService:TakeScreenshotCaptureAsync(onCaptureReady, { UICaptureMode = Enum.UICaptureMode.All })
Missing documentation
This is what returns with:
print(game:GetService("ReflectionService"):GetPropertiesOfClass("ScreenshotCapture"))
00:59:38.243 ▼ {
[1] = ▼ {
["Display"] = ▼ {
["Category"] = "Data"
},
["Name"] = "CaptureTime",
["Owner"] = "Capture",
["Permits"] = ▼ {
["Read"] = Capture
},
["Serialized"] = false,
["Type"] = ▼ {
["EngineType"] = "DateTime",
["ScriptType"] = "DateTime"
}
},
[2] = ▼ {
["Display"] = ▼ {
["Category"] = "Data"
},
["Name"] = "CaptureType",
["Owner"] = "Capture",
["Permits"] = ▼ {
["Read"] = Capture
},
["Serialized"] = false,
["Type"] = ▼ {
["EngineType"] = "Enum",
["EnumType"] = "CaptureType",
["ScriptType"] = "EnumItem"
}
},
[3] = ▼ {
["Display"] = ▼ {
["Category"] = "Data"
},
["Name"] = "LocalId",
["Owner"] = "Capture",
["Permits"] = ▼ {
["Read"] = Capture
},
["Serialized"] = false,
["Type"] = ▼ {
["EngineType"] = "string",
["ScriptType"] = "string"
}
},
[4] = ▼ {
["Display"] = ▼ {
["Category"] = "Data"
},
["Name"] = "SourcePlaceId",
["Owner"] = "Capture",
["Permits"] = ▼ {
["Read"] = Capture
},
["Serialized"] = false,
["Type"] = ▼ {
["EngineType"] = "int64",
["ScriptType"] = "number"
}
},
[5] = ▼ {
["Display"] = ▼ {
["Category"] = "Data"
},
["Name"] = "SourceUniverseId",
["Owner"] = "Capture",
["Permits"] = ▼ {
["Read"] = Capture
},
["Serialized"] = false,
["Type"] = ▼ {
["EngineType"] = "int64",
["ScriptType"] = "number"
}
},
[6] = ▼ {
["Display"] = ▼ {
["Category"] = "Data"
},
["Name"] = "ClassName",
["Owner"] = "Object",
["Permits"] = ▼ {
["Read"] = None
},
["Serialized"] = false,
["Type"] = ▼ {
["EngineType"] = "string",
["ScriptType"] = "string"
}
},
[7] = ▼ {
["Display"] = ▼ {
["Category"] = "Data",
["DeprecationMessage"] = "Use `ClassName` instead."
},
["Name"] = "className",
["Owner"] = "Object",
["Permits"] = ▼ {
["Read"] = None
},
["Serialized"] = false,
["Type"] = ▼ {
["EngineType"] = "string",
["ScriptType"] = "string"
}
}
}
Upon attempting to use FilePathString inside of a published game, it instantly crashes.
However, joining the game on a mobile device does not crash but rather kicks the player with the message:
"There was a problem receiving data, please reconnect."
I could not decide exactly which topic/category this bug should be reported in, so “Documentation Issues / Documentation Content” MIGHT be inaccurate
Page URL: https://create.roblox.com/docs/reference/engine/classes/ScreenshotCapture
