Still have questions? Join our Discord server and get real time help.
Log in to vote

How to make a bone follow a part while being parented to another part?

Asked by 5 days ago
Edited 4 days ago

So I'm trying to make a "morph" type of thing using the new skinned meshparts update. I am trying to make a bone copy the same movements as another part. By the way, I don't want to make an animation as this is meant to work with all roblox animation packs.

Here is some code:

local RP = char.Luigi.RootPart
local rBone = RP.root.root_motion

local opHead = nil

while true do
    local bone = rBone.root_body.ske_body.root_head
    local compare = char["UpperTorso"]
    if opHead == nil then
        opHead = bone.Position
    local rotate = - root.Orientation.x), hed.Orientation.y - root.Orientation.y, hed.Orientation.z - root.Orientation.z) - - root.Orientation.x, compare.Orientation.y - root.Orientation.y, compare.Orientation.z - root.Orientation.z)
    local pos = - root.Position.x), hed.Position.y - root.Position.y, hed.Position.z - root.Position.z) - - root.Position.x, compare.Position.y - root.Position.y, compare.Position.z - root.Position.z)
    bone.Orientation = rotate
    bone.Position = opHead + pos
Update: I have kind of fixed it but its still super broken. By the way, the point of the morph is to be able to play any roblox animation for R15, not just custom ones youngmacka123 15 — 4d

Answer this question