
[ad_1]
I’m making a shapeshift command that you can run via chat. It works pretty similar to how HD Admin handles character morphin (https://create.roblox.com/marketplace/asset/13549366436)
I know how to get the model a specified player’s avatar by using HumanoidDescription
. However, I want to make a new rig with the specified avatar. The reason I want to do this is so that I can put a” animation during the command. How do I do this?
Code (Simplified)
{
PrimaryAlias = "shapeshift",
SecondaryAlias = "change",
PermissionLevel = 0,
Function = function(player: Player, args: { string })
local TemporaryRig = game.ReplicatedStorage.Rig.R15:Clone()
TemporaryRig.Parent = game.Workspace
game.Players.PlayerAdded:Connect(function(player)
TemporaryRig.Position = player.Character.Position -- Main Problem
local id = PlayerService:GetUserIdFromNameAsync(args[1])
print(id .. " returned when GetUserIdFromNameSync") -- Debug
print(args[1] .. " returned") -- Debug
local newHumanoidDescription = game.Players:GetHumanoidDescriptionFromUserId(id)
TemporaryRig.Humanoid:ApplyDescription(newHumanoidDescription)
end)
end,
},
```
[ad_2]