Temateite
(Temateite)
March 25, 2024, 7:05am
#1
Hello i would like to instantly rotate the character relative to the where the character is going. I know there is a way as i had the line on my old script i loss it, i can’t remember how i did it
Here is my current attempt (CFrame.LookAt), that unfortunatly doesn’t work.
char.PrimaryPart.CFrame = CFrame.new(char.PrimaryPart.Position, Vector3.new(Direction.X * 5, 0, Direction.Z * 5))
Thank you for your help
I am assuming you are asking for the line for how your humanoidrootpart positions itself
local moveDirection = humanoid.MoveDirection -- define humanoid & its movedirection units
local directionPos = Vector3.new(moveDirection.X * 5, 0, moveDirection.Z * 5))
char.PrimaryPart.CFrame = CFrame.new(char.PrimaryPart.Position, char.PrimaryPart.Position + directionPos)
1 Like
Temateite
(Temateite)
March 25, 2024, 7:26am
#3
I finally find the lines again
local aln = char.PrimaryPart.AssemblyLinearVelocity
char.PrimaryPart.CFrame = CFrame.new(char.PrimaryPart.Position, char.PrimaryPart.Position + Vector3.new(aln.X*2, 0, aln.Z*2))
Here is it
oh okay could also do that
test
test
test
1 Like
assuming you’ve already connected the line to a connection of a signal as movedirection?
1 Like
Temateite
(Temateite)
March 25, 2024, 7:29am
#7
My bad i did an error, this work as well, thank you
system
(system)
Closed
April 8, 2024, 7:29am
#8
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.