Rotating A Npc/Character Model

You can write your topic however you want, but you need to answer these questions:

  1. So I don’t want the npc to spin around I just want to rotate it to 1 position so no looping

  2. So i got the script that makes the npc move and rotate around in a loop but i was it so it will go back to the starting position and rotate facing (0,0,0) I already can make the npc teleport back but i need to know how to rotate the hole model facing forward

  3. I have tried lots of different ways for example

HRP.CFrame = CFrame.Angles(0,0,0)

So i just want to rotate the hole model not in a loop just like put it in the position

Rotating a model can be challenging for new users due to how CFrames work. In order to rotate a model, the model needs a primary part which you will then rotate.

You can do this in a simple script, like so:

rotation = CFrame.Angles(0, math.rad(90), 0) -- Rotate 90 degrees to the left

modelCFrame = model:GetPrimaryPartCFrame()

model:SetPrimaryPartCFrame( modelCFrame * rotation )

Credit: How to rotate a model using scripts

I don’t want to turn it i want to set it to a certain orientation could you help with that?

Fixed it after 2 hours of googling here is the code hope this helps others

script.Parent:SetPrimaryPartCFrame(CFrame.new(script.Parent.PrimaryPart.Position, script.Parent.Parent.End.Position))
1 Like