#Other parts don't follow the head

1 messages · Page 1 of 1 (latest)

glacial sigil
#

also this is he's "rig"

#

i tried :MoveTo but it didn't worked

visual yoke
#

wow

#

that is scary

glacial sigil
#

thanks

#

he was suppose to be funny but ok

visual yoke
#

funny

#

bruh

#

what are u trying to do tho

glacial sigil
#

im trying to make he move to the player with the horns and eyes

#

and he looks at the player too

visual yoke
#

so u want his horns and eyes to follow the plrs look at dierection?

glacial sigil
#

no

visual yoke
#

wdym

glacial sigil
#

look at the script

#

the head follows the player but the horns and eyes aren't with the head

visual yoke
#

hold on

#

ok i think i know whats the problem

glacial sigil
visual yoke
#

yeah so

#

why dont u just

#

weld them

glacial sigil
#

i did this

visual yoke
#

which weld did u use?

glacial sigil
#

weld constraint

visual yoke
#

goood

#

ok wait

#

did u script the welds?

#

or set it up?

glacial sigil
#

?

#

do u mean instance.new

#

?

visual yoke
#

yes

glacial sigil
#

no

visual yoke
#

so u want the

#

accessory's to not move but the skull does

#

or do u want it follow it

glacial sigil
#

follow

visual yoke
#

if so i made a script for it

glacial sigil
#

rlly?

visual yoke
#

local Players = game:GetService("Players")
local FakeHead = script.Parent.PrimaryPart

local function WeldAccessoriesToFakeHead(character, fakeHead)
for _, accessory in pairs(character:GetChildren()) do
if accessory:IsA("Accessory") then
local handle = accessory:FindFirstChild("Handle")
if handle then
local oldWeld = handle:FindFirstChildWhichIsA("Weld")
if oldWeld then
oldWeld:Destroy()
end

            local weld = Instance.new("WeldConstraint")
            weld.Part0 = handle
            weld.Part1 = fakeHead
            weld.Parent = handle

            handle.CFrame = fakeHead.CFrame
        end
    end
end

end

Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
WeldAccessoriesToFakeHead(character, FakeHead)

    game:GetService("RunService").Heartbeat:Connect(function()
        local rootPart = character:WaitForChild("HumanoidRootPart")
        local playerPos = rootPart.Position

        FakeHead.CFrame = CFrame.new(FakeHead.Position, playerPos)
        FakeHead.Position += FakeHead.CFrame.LookVector * 0.5
    end)
end)

end)

#

there

#

see if it works

glacial sigil
#

oh thanks

visual yoke
#

did it work?

#

u can remove the old welds part if u want

#

it will just auto set it up for you

#

or u can follow the weld process

glacial sigil
#

it didnt work

#

like it moves

#

oh i tried again and stopped

#

doesnt move anymore

visual yoke
#

hmm

glacial sigil
#

but is just i code the welds then?

#

wait

#

i will try fix some stuff and i see if works

visual yoke
#

k

#

if so

#

one more question

#

do u want it to follow the plrs head

#

like where evr they look?

glacial sigil
#

?

visual yoke
#

no like does the head follow the player

#

base on where they look?

glacial sigil
#

no

#

i want him to look at the player

visual yoke
#

k

#

i made something similar to that

#

expect in the

#

stater player

#

so it can avoid

#

looking at multiple plrs at once

#

and only look at one based on there POV

#

so what i did

#

if ur working wiht a rig

#

like an r6 rig

#

u can make the a motor 6d look at the player

glacial sigil
#

the game is just for one person

visual yoke
#

k

#

if so

#

then u can use it inside the model

#

or something

#

so try using a motor 6d

#

the acess can be weld

glacial sigil
#

u can use

  plr.PlayerAdded:Connect(function(Player)
           game["RunService"].Heartbeat:Connect(function()

  end)



  end)```
visual yoke
#

yeah

glacial sigil
#

it gets the only person in the game so

#

i rlly need to u use that

visual yoke
#

i used this func local torso = npc:WaitForChild("Torso", 3)
local neck = torso and torso:WaitForChild("Neck", 3)
if torso and neck then
npcs[npc] = {
Torso = torso,
Neck = neck,
LastTransform = CFrame.new()
}

#

if so it will remove it

#

if its out of range

#

instead of using heart beat

#

i used Stepped

glacial sigil
#

idk man

#

i prefer use heartbeat

visual yoke
#

k

#

this is the main code for me local torsoCFrame = data.Torso.CFrame
local distance = (rootPart.Position - torsoCFrame.Position).Magnitude

    if distance <= 75 then
        local isCloseEnoughToStare = distance < 25 and torsoCFrame.LookVector:Dot((rootPart.Position - torsoCFrame.Position).Unit) > 0.25
        local targetPos = isCloseEnoughToStare and rootPart.Position or torsoCFrame.Position + torsoCFrame.LookVector
        local localLookVector = CFrame.new(targetPos, torsoCFrame.Position):ToObjectSpace(torsoCFrame).LookVector * Vector3.new(1, -1, 1)

        local xAngle = -math.asin(localLookVector.y)
        local zAngle = -math.asin(localLookVector.x)
        local targetTransform = CFrame.Angles(0, 0, zAngle) * CFrame.Angles(xAngle, 0, 0)

        data.LastTransform = data.LastTransform:Lerp(targetTransform, 0.1)
        data.Neck.Transform = data.LastTransform
#

try using tags

#

in collective service

#

mainly to ur model

#

like this

#

hope this helps

glacial sigil
#

omg this looks so dificult

#

idk man

#

i think i will just put the white flag

visual yoke
#

its not that hard

#

its just 76 lines of ocde man 😭😭

glacial sigil
#

ok i will put

visual yoke
#

k

sacred vectorBOT
#

studio** You are now Level 10! **studio

glacial sigil
#

got some errors