Rotating head along with VR, how do I start?


I’m working on a VR project for testing and educational purposes. I’m guessing I have to use VRService.UserCFrameChanged, but I’m not sure.

Does anyone know how to?


You are correct that you need to use VRService.UserCFrameChanged however there are two parameters that are given in that event, the Enum value of the limb or head that was changed and the new CFrame value of it. Here is an example of how I handle VR movement.

VRService.UserCFrameChanged:Connect(function(Type ,new)
	local vect =,new.Y,new.Z)
	local camVec =,camera.CFrame.Y,camera.CFrame.Z)
	if Type == Enum.UserCFrame.Head then		
		Head["BodyPosition"].Position = (*(camera.HeadScale-1))*new).Position
		Head["BodyGyro"].CFrame = (*(camera.HeadScale-1))*new) * CFrame.Angles(0,0,0)
		local CRX, CRY = Head.CFrame:ToOrientation()
	elseif Type == Enum.UserCFrame.LeftHand then
			LH["BodyPosition"].Position = camera.CFrame * (*(camera.HeadScale-1))*new).Position
			LH["BodyGyro"].CFrame = camera.CFrame * (*(camera.HeadScale-1))*new) * CFrame.Angles(80,0,0)
		elseif Type == Enum.UserCFrame.RightHand then
			RH["BodyPosition"].Position = camera.CFrame * (*(camera.HeadScale-1))*new).Position
			RH["BodyGyro"].CFrame = camera.CFrame * (*(camera.HeadScale-1))*new) * CFrame.Angles(80,0,0)

I do not directly use the CFrame values, however they do translate to body force (this causes the vr parts to have their own physics instead of passing straight through blocks)

I have an open-sourced place that contains a lot of VR content. Check it out if you want.


Thank you for the help! Although I do have a question regarding your open-source VR game. It’s not uncopylocked, but it said that it was open-sourced. Is it supposed to be not uncopylocked?

It is now uncopylocked (I guess I ticked the wrong box)
Also be aware there may be a couple aspects that may not work fully as intended either because of Roblox updates or me fiddling with code.
Thanks for letting me know!

1 Like