I’m trying to set the right arm of the character to be this item: Skeleton Right Arm - Roblox
At the moment when I run the script below with the id it runs correctly and spawns in the item it gets parented to the player, but it doesn’t weld to the player correctly and then after a few seconds it gets deleted for some reason. I have done this with hats and other things and they have automatically welded properly to the player.
game.ReplicatedStorage.InsertItem.OnServerEvent:Connect(function(player, text)
local id = text
local char = player.Character
local item = game:GetService("InsertService"):LoadAsset(id)
item.Name = ""..id
local name = player.Name
item.Parent = game.Workspace.Heads
local part = game.Workspace.Heads[id]:GetChildren()
if part[1]:IsA("Folder") then
print("Test")
local parts = part[1].Parent.R15Fixed:GetChildren()
for i, child in pairs(parts) do
print("Test2")
if child.Name == "RightHand" or child.Name == "RightUpperArm" or child.Name == "RightLowerArm" then
char[child.Name]:remove()
parts[i].Parent = char
end
end
end
end)
Any help is appreciated!
Side question, how might I replace the torso and head of the player without killing them, you don’t have to answer this.