Cant set CFrame rotation

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

  1. What do you want to achieve? Hi’ Ive manage to make a floating origin, But now, My players wont rotate, Even if it rotates, Itll make my character tilted

  2. What is the issue? No Matter what i tried, They won’t rotate, Even with custom cframe rotation, and move direction implemented as Cframe.Angles

  3. What solutions have you tried so far? Cframe.FromOrientation, toEulerXYZ, CFrame.Angles

while task.wait() do
	local playerCFrame = CFrame.new(script.Parent:GetPivot().Position)
	--print(rotation)

	for _,v in pairs(workspace.Shiftable:GetChildren()) do
		local pivot = v:GetPivot()
		local cframe = playerCFrame:ToObjectSpace(pivot)
		v:PivotTo(cframe*CFrame.new(0,playerCFrame.Y,0))--*CFrame.Angles(rotation.X,rotation.Y,rotation.Z))
	end
	local cf = CFrame.new(0,playerCFrame.Y,0)*CFrame.Angles(math.rad(script.Parent.PrimaryPart.Orientation.X),0,math.rad(script.Parent.PrimaryPart.Orientation.Z))
	script.Parent:PivotTo(cf)
end
3 Likes

Hey there, I have your solution here. It is a little amount of code actually. It works on my own character to:

local char = script.Parent

while task.wait() do
	char:PivotTo(char:GetPivot() * CFrame.Angles(0,.005,0))
end

Hope this helped you!

EDIT: Here is a little gif that shows the result:

2 Likes

Hi That is not my type of solution unfortunatly I wanted the character Rotation to match the Move direction from the humaniod, Essentially, looking where it is moving

3 Likes

Ooh but isn’t that just shift lock?

1 Like

Nope, I am currently Moving the world around the character, And i move the character to 0,0,0, But I cant rotate my character where he goes, Like if i press a the character will still look forward

1 Like

Hmm okay
So it is basically like an inverted shift lock because of the fact that the world is moving around the player right?

1 Like

Its not a shiftlock, The player press a, He should look left, Like the normal third person roblox, The problem is I am setting the player position to 0,0,0 every frame, And it works, But The charatcer does not rotate

1 Like

What position do you want the character to rotate?

1 Like

I want them to rotate on the global y axis, And they stay at 0, ypos, 0

1 Like