Log in to vote

How do i make a VR script, Im trying to get the controller positions and the headset position?

Asked by 7 months ago

Im making a VR script for fun all i want to know is how do i get the right/left controller positions? i made the hand's If you dont know do not respond to this question.

 local vr = game:GetService("VRService")  local hand1 ="Part",workspace.Andrew_KnowsRBLX)   local hand2 ="Part",workspace.Andrew_KnowsRBLX)  hand1.Name = "Right Hand" hand2.Name = "Left Hand" hand1.Size =, 5.359, 2.614)   hand2.Size =, 5.359, 2.614))

1 answer

Log in to vote
Answered by
TTChaos 749 Moderation Voter
7 months ago

Use VRService:GetUserCFrame

local VRService = game:GetService("VRService")  
local Character = workspace.Andrew_KnowsRBLX
local LeftHand ="Part", Character)   
local RightHand ="Part", Character)     
RightHand.Name = "Right Hand" 
LeftHand.Name = "Left Hand"
RightHand.Size =, 5.359, 2.614)   
LeftHand.Size =, 5.359, 2.614)
RightHand.CFrame = VRService:GetUserCFrame(Enum.UserCFrame.RightHand)
LeftHand.CFrame = VRService:GetUserCFrame(Enum.UserCFrame.LeftHand)

Answer this question