#problem with scripts, character turns to the right when such task is not set

1 messages · Page 1 of 1 (latest)

grim hornet
vagrant glen
#

what's the problem here? like the camera flick to the right when going to the green guy?

vagrant glen
# grim hornet please help

if that's the problem then it was because you only set the targetCFrame 's postion (gotogreenblockclient)

#

the orientation isnt set, so by default the lookvector would just be facing the red guy

grim hornet
#

I don't understand how to fix this

vagrant glen
#

i think this solve the problem:

local targetCFrame = CFrame.LookAlong(targetPosition, rootPart.CFrame.LookVector, Vector3.yAxis)

grim hornet
#

it didn't help, now the script doesn't work at all

vagrant glen
#

send me the stuff in output tab

grim hornet
#

same error

vagrant glen
grim hornet
#

?

#

a

vagrant glen
#

goog...

#

sorry

#

.lookAlong

#

that should be my last error

grim hornet
abstract archBOT
#

studio** You are now Level 1! **studio

vagrant glen
#

wait wait wait, here

#

local targetCFrame = CFrame.lookAlong(targetPosition, rootPart.CFrame.LookVector, Vector3.yAxis)

#

the l in "lookalong" wasnt supposed to be capitalized

grim hornet
#

now it's clear

#

everything is moving correctly now, thank you very much!