(post deleted by author) (post deleted by author) (post deleted by author)
I believe that Humanoid:ApplyDescription is what you’re looking for.
If you need a direct example of it, use the built-in ‘Build Rig’ plugin in Roblox studio to spawn an r15 block rig, make sure the rig is in workspace, then put this into a script in serverscriptservice:
local function onPlayerAdded(player)
local user = player.UserId --defines userid as ID of player who spawned
print(user)
local dum = game.Workspace.Dummy
dum.Humanoid:ApplyDescription(game.Players:GetHumanoidDescriptionFromUserId(user)) --applies description of avatar gathered from userid onto the humanoid of the dummy
end
game.Players.PlayerAdded:Connect(onPlayerAdded)
Here’s an rbxl file showcasing applydescription being used for applying the description of a player onto a StarterCharacter, just incase you would like it:
applydescription.rbxl (67.6 KB)
Not exactly what im looking for, basically what i want is to replace the default R15 character rig.
When the player spawns i want them to have a different body than the default roblox gives you (The image below is the image of both rigs, left one is the one i want to be set default, right one is default by roblox)
Edit: I also want them to keep everything they are wearing so setting it as the startercharacter would not work for me
I think that would exactly work in the rbxl file I provided(granted that you rename the rig model to StarterCharacter, then place it into StarterPlayer).
This is exactly what applydescription does tho. It takes your hats, shirts, pants, accessories, then puts them onto a humanoid.
Please watch this video example to make sure it isn’t what you’re asking for, as it’d make this all easier:
I got it to work now, thanks for the help!
oh yeah, not sure about your skill level, so I’m just gonna say this:
when a player dies, their character will go back to the original startercharacter, which doesn’t have the accessories of the player.
to stop this, put another script into serverscriptservice with this code:
game:GetService('Players').PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
character:WaitForChild("Humanoid").Died:Connect(function()
local user = player.UserId
print(user)
wait(7)
local char = player.Character
char.Humanoid:ApplyDescription(game.Players:GetHumanoidDescriptionFromUserId(user))
end)
end)
end)