Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does CFrame teleport my model upside down?

Asked by 4 years ago

My model is a horse with motors so it can run etc. I have set Primary Part to Humanoid Root Part. I am teleporting horse to a flat part named DesertSpawn

Horse. HumanoidRootPart.CFrame = DesertSpawn.CFrame and Horse:SetPrimaryPartCFrame(DesertSpawn.CFrame)

Both of these statements teleport Horse model to DesertSpawn with head down and legs up in the air. Does anyone have an idea how I can make the Horse land on its legs?

1 answer

Log in to vote
0
Answered by 4 years ago

You could do

:SetPrimaryPartCFrame(DesertSpawn.CFrame * CFrame.Angle(math.rad(0), math.rad(0), math.rad(0))
0
The reason i do math.rad here is to tell the script i use it for angle Nguyenlegiahung 1091 — 4y
Ad

Answer this question