Experimenting with code

i know mouse.Hit.Position.X relates to Vector3 and mouse.Hit.X is related to CFrame in terms of the PointToObjectSpace but i just dont understand what im doing wrong.

		rightshoulder.C0 = CFrame.new(rightshoulder.C0.Position):Orthonormalize() * CFrame.Angles(0,math.deg(mouseHit.X/-800),0,0):PointToWorldSpace(CFrame.new(0,mouseHit.X,0))
		rightshoulder.C1 = CFrame.new(rightshoulder.C1.Position):Orthonormalize() * CFrame.Angles(math.deg(mouseHit.Y/800),0,0):PointToWorldSpace(CFrame.new(mouseHit.Y,0,0))

image

the problem is occuring here:

:PointToWorldSpace(CFrame.new(0,mouseHit.X,0))
:PointToWorldSpace(CFrame.new(mouseHit.Y,0,0))

Check where you have your ending brackets!

You may have intended for them to before the :.

1 Like

:PointToWorldSpace() is called on Vector3 and not CFrame (as the error message states). Use :ToWorldSpace() instead.

1 Like

hey syntax. yes ur right. i tried toworldspace earlier and i was still getting the error message. i either had an unwanted vector3 or CFrame tysm!!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.