How to transfer a player model!

I am working on a game that contains plushies but I would like to make a custom plushie of every player automatically

  1. Currently I Have A few custom plushies for friends they are meshes (obj) and given trough a script! But I need to make a custom plushie for game pass owners automatically

  2. Currently I have no idea if it is possible to transform models into obj files trough a script!

  3. If that is not possible does anyone have any better ideas!?

Any help is appreciated

image
image

3 Likes

I don’t know if it is possible, because if you use a character that has a humanoid in a tool, you and both the tool-character will die.

1 Like

yes! that’s why I was asking! it is also not possible to remove the rig and humanoid because the player will lose clothes!

It isn’t possible to transform model into obj using script.

You can:
a) Simple solution: Leave humanoid, remove animate script. Not very performance-friendly.
b) Complicated solution: Export R6 rig as an obj. Make UV unwrap using shirt and pants templates. Import it back into Roblox. For optimal performance you can join torso and arms into one model and do the same to legs. Write a script that assigns shirt and pants texture to SpecialMeshes and copies all acessries’ meshes. Do the same for R15.

1 Like

Removing the animate script somehow doesn’t work! ill try the complicated solution thank you! once I complete ill mark you as a solution!

also one more question: How do you export a rig I cannot find a solution yet

You can do it by right-clicking an item in explorer and then clicking “Export Selection” in context menu.
The geometry it produces is often isn’t properly joined together, so it’s better to export an empty rig so it’ll be easier to fix.

is it possible to do this automated by script?

oh u mean make a template and add shirts?

how would you unwrap shirts? @TheArturZh

Import obj into blender, go to UV editing tab, load shirt template as UV editor background and as a mesh material. Allign vertices with image. It’s difficult to do it perfectly, so at least try to avoid having white pixels on a model.

You can use HumanoidDescription to solve this problem!

you can make a default rig using Roblox’s plugin in plugins tab:
Capture

[color = Red]WARNING:[/color] make sure that you delete the duped face instance in the rig’s head
Capture

now once you’re done with it you can use this script that I usually use for these cases

Script
local desc1 = game:GetService("Players"):GetHumanoidDescriptionFromUserId(Player_UserId) --> Getting the player's description(character).

local newDesc = Instance.new("HumanoidDescription") --> Instancing a new description to apply.

local model = game --> path to the cloned rig

local properties = {

"BackAccessory";

"FaceAccessory";

"FrontAccessory" ;

"HairAccessory";

"HatAccessory";

"NeckAccessory" ;

"ShouldersAccessory";

"WaistAccessory";

["BodyTypeScale"] = desc1.BodyTypeScale/2; --> Do NOT change these unless you want to make the character way more smaller

["DepthScale"] = desc1.DepthScale/2;

["HeadScale"] = desc1.HeadScale/2;

["HeightScale"] = desc1.HeightScale/2;

["ProportionScale"] = desc1.ProportionScale/2;

["WidthScale"] = desc1.WidthScale/2;

"Face";

"Head";

"LeftArm";

"LeftLeg";

"RightArm";

"RightLeg";

"Torso";

"GraphicTShirt";

"Pants";

"Shirt";

"HeadColor";

"LeftLegColor";

"LeftArmColor";

"RightArmColor";

"RightLegColor";

"TorsoColor"

}

for property,value in pairs(properties) do --> changing the new HumanoidDescription's properties to match with the player's character but smaller.

if typeof(property)~= "string" then

newDesc[value] = desc1[value]

else --> if we had a default value for the property apply it.

newDesc[property] = value

end

end

model.Humanoid:ApplyDescription(newDesc) --> applying the Description to the rig.
Result

Capture Capture2

You can read this for more information:
https://developer.roblox.com/en-us/api-reference/class/HumanoidDescription

EDIT1:
You can also make a tool with a handle and put your dummy within it, then add a server script to your dummy with the following code and boom! everything will be done automatically!

Code
local desc1 = game.Players:GetHumanoidDescriptionFromUserId(1023166785)

local newDesc = Instance.new("HumanoidDescription",game.Workspace)

local model = script.Parent

local p = {

"BackAccessory";

"FaceAccessory";

"FrontAccessory" ;

"HairAccessory";

"HatAccessory";

"NeckAccessory" ;

"ShouldersAccessory";

"WaistAccessory";

["BodyTypeScale"] = desc1.BodyTypeScale/2;

["DepthScale"] = desc1.DepthScale/2;

["HeadScale"] = desc1.HeadScale/2;

["HeightScale"] = desc1.HeightScale/2;

["ProportionScale"] = desc1.ProportionScale/2;

["WidthScale"] = desc1.WidthScale/2;

"Face";

"Head";

"LeftArm";

"LeftLeg";

"RightArm";

"RightLeg";

"Torso";

"GraphicTShirt";

"Pants";

"Shirt";

"HeadColor";

"LeftLegColor";

"LeftArmColor";

"RightArmColor";

"RightLegColor";

"TorsoColor"

}

for property,value in pairs(p) do

if typeof(property)~= "string" then

print("1",value,property, typeof(property))

newDesc[value] = desc1[value]

else

print("2",value,property)

newDesc[property] = value

end

end

model.Humanoid:ApplyDescription(newDesc)

model.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Dead, false)

model.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Swimming, false)

model.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Running, false)

model.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false)

model.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Freefall, false)

model.Humanoid:SetStateEnabled(Enum.HumanoidStateType.GettingUp, false)

model.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Seated, false)

model.Humanoid:SetStateEnabled(Enum.HumanoidStateType.PlatformStanding, false)

model.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Landed, false)

model.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Flying, false)

model.Humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false)

model.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Climbing, false)

model.Humanoid:SetStateEnabled(Enum.HumanoidStateType.RunningNoPhysics, false)

model.Humanoid:SetStateEnabled(Enum.HumanoidStateType.StrafingNoPhysics, false)

model.Humanoid:SetStateEnabled(Enum.HumanoidStateType.None, false)

model.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Physics, true)

local newModel = Instance.new("Model",model)

newModel.Name = "Rig"

newModel.PrimaryPart = model.PrimaryPart

model.PrimaryPart = nil

local weld = Instance.new("WeldConstraint",model.HumanoidRootPart)

weld.Part0 = model.Parent.Handle

weld.Part1 = model.HumanoidRootPart

for _,v in pairs(model:GetChildren()) do

if v ~= newModel and v ~= script then

v.Parent = newModel

end

end

for _,v in pairs(model:GetDescendants()) do

if v:IsA("BasePart") then

v.Anchored = false

v.CanCollide = false

v.Massless = true

end

end

model = newModel

model.Humanoid:ChangeState(Enum.HumanoidStateType.Physics)

model.Humanoid.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
1 Like

Here is a siple character loader that I made it’s uncopy locked it might help you!

hi! thank you for your reply! I keep getting the same errors might be something small but I can’t figure it out!

Invalid state passed to SetStateEnabled. - Studio
Handle is not a valid member of Workspace “Workspace” - Server - Script:133

to make this work first put your dummy inside of a tool, then put a script inside of it also make sure that you tool does have a handle.

Hi thank you! I have been looking all day! It works!

1 Like