Cloned model won't parent/weld to Robloxian 2.0 torso package type

Hi, I have created a script that clones a model in my workspace called keyboard, and welds it to the players characters UpperTorso. This works completely fine on the normal “1.0” Roblox character package, however…

When I wear a Robloxian 2.0 package, the keyboard clone model does not parent nor weld to the players characters UpperTorso. Console still prints the instance, as if it exists, but the keyboard clone doesn’t show up in the explorer tab, and there are no errors shown in console either. I want my script to be able to apply the clone keyboard model to any kind of torso, no matter what package the player is wearing, but I have no idea what is wrong or why it isn’t working on 2.0 models. How can I do this? thank you!
gif of the problem

Script -

local ServerStorage = game:GetService("ServerStorage")

local original = ServerStorage.KeyboardOriginal

local function onCharacterAdded(character)
    local head = character:WaitForChild("Head")
    local upperTorso = character:WaitForChild("UpperTorso")

    --create keyboard for player and attach to back
    local keyboard = original:Clone()
    keyboard.Name = "Keyboard"
    keyboard.Parent = upperTorso
    keyboard.PrimaryPart = keyboard.Backboard
    keyboard.PrimaryPart.CFrame = upperTorso.CFrame *,0,0.55) * CFrame.Angles(math.rad(90),math.rad(225),0)

    --create weld for keyboard
    local keyboardWeld ="Weld", upperTorso)
    keyboardWeld.Part0 = upperTorso
    keyboardWeld.Part1 =  keyboard.Backboard
    keyboardWeld.C0 = upperTorso.CFrame:Inverse()
    keyboardWeld.C1 = keyboard.Backboard.CFrame:Inverse()
1 Like

For anyone searching for the answer to this, I figured out that the problem is that Roblox loads the character like this -

  1. Loads character with no package - then runs CharacterAdded
  2. If the player is wearing a package, it reloads each limb of the character with the applied package, and then runs CharacterAppearanceLoaded

so it was welding the model to a part that was then being removed and replaced by Roblox, hence why it wasn’t working. I needed to be using this instead, which waits for the characters package to load before it runs.

1 Like