Log in to vote

How To Make Rig Teleport And Face A Certain Direction?

Asked by 3 months ago

i want a script where it makes the rig moves to a part and faces the direction of that part

Use CFrame xInfinityBear 1777 — 3mo
CFrame the humanoidRootPart of the player to a part Fouxelefr 7 — 3mo

2 answers

Log in to vote
Answered by 3 months ago
Edited 3 months ago

use CFrame you can use the look vector function then inputting the vector to the look vector, to make it look at a part do

part.CFrame.LookVector  = playercharacter.Head.Vector3

to make it continously look at a part do

while true do
    parthere.CFrame.LookVector = playercharacter.Head.Vector3

though if it causes lag change the wait time

Log in to vote
Answered by 2 months ago

This is not a request site, but I'll help you out.

You can teleport a rig by setting the CFrame of the rig's PrimaryPart (usually the HumanoidRootPart or Head)

You can make the rig face the part by using CFrame.lookAt()

part = workspace:WaitForChild("Part") -- change this to your Part
rig = workspace:WaitForChild("R6") -- change this to your rig

-- teleport
rig.PrimaryPart.CFrame = part.CFrame

-- turn
rig.PrimaryPart.CFrame = CFrame.lookAt(rig.PrimaryPart.Position,, rig.PrimaryPart.Position.Y, part.Position.Z)

I typed everything on mobile so let me know if there's any errors

Answer this question