Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

why wont this turn the whole character and only the humanoidrootpart?

plr.Character.HumanoidRootPart.Orientation = Vector3.new(0, -90, 0)

when I use this to turn the humanoidrootpart making it move every other part but it doesnt do that, on your screen you look fine but on the server you are facing straight and when clicking your humanoidrootpart its turned toward the area where its supposed to be pointing. can anyone help me with this?

1 answer

Since your only rotating the humanoid root part the rest won't go with it, try this code

for i, v in pairs(char:GetChildren()) do
	if v:IsA("BasePart") then
		v.Orientation = Vector3.new(0,-90,0)
	end
end

I already tested this I know it works!

3 comments

0

matt’s solution works but it’s a little bit inefficient :). the method Model:SetPrimaryPartCFrame() will alter the cframe of the root part and move everything else with it and was designed for this purpose.

0

when doing what you said, makes this, why - Roblox Studio (gyazo.com) I dont know how to make it where the parts are still "welded" to the torso

0

Please if it works, Accept my anwser

This discussion is preserved as it was. New answers, comments, and votes are closed.