Switch to Tadah-style asset rendering

This commit is contained in:
cirroskais 2023-08-27 06:03:58 -04:00
parent 234b6d7e53
commit 7c5cc4b27b
No known key found for this signature in database
GPG Key ID: E55435DEA0825091
1 changed files with 6 additions and 13 deletions

View File

@ -8,23 +8,16 @@ game:GetService("InsertService"):SetAssetVersionUrl(baseUrl .. "/Asset/?assetver
game:GetService("ContentProvider"):SetBaseUrl(baseUrl)
game:GetService("ScriptContext").ScriptsDisabled = true
local Player = game.Players:CreateLocalPlayer(0)
Player.CharacterAppearance = ("%s/Asset?id=%d"):format(baseUrl, assetId)
Player:LoadCharacter(false)
local asset = game:GetObjects(("%s/asset/?id=%d"):format(baseUrl, assetId))[1]
asset.Parent = workspace
game:GetService("RunService"):Run()
Player.Character.Animate.Disabled = true
Player.Character.Torso.Anchored = true
local gear = Player.Backpack:GetChildren()[1]
if gear then
gear.Parent = Player.Character
Player.Character.Torso["Right Shoulder"].CurrentAngle = math.rad(90)
local thumbnailCamera = asset:FindFirstChild("ThumbnailCamera")
if thumbnailCamera ~= nil and thumbnailCamera.ClassName == "Camera" then
workspace.CurrentCamera = thumbnailCamera
end
print(("[%s] Rendering ..."):format(jobId))
local result = game:GetService("ThumbnailGenerator"):Click(format, x, y, true)
print(("[%s] Done!"):format(jobId))
return result
return result