1
\$\begingroup\$

I am trying to create a Roblox game with VR support. My understanding is that this code should move the hands of the character as the user moves the controllers:

local leftHand = workspace:FindFirstChild("LeftHand")
local rightHand = workspace:FindFirstChild("RightHand")
local head = workspace:FindFirstChild("Head")

if leftHand and character:FindFirstChild("LeftHandAttachment") then
    leftHand.CFrame = character:WaitForChild("LeftHandAttachment").CFrame
end

if rightHand and character:FindFirstChild("RightHandAttachment") then
    rightHand.CFrame = character:WaitForChild("RightHandAttachment").CFrame
end

if head and character:FindFirstChild("Head") then
    head.CFrame = character:WaitForChild("Head").CFrame
end

However, what I am noticing is that:

  1. Left hand rotates when I rotate my controller, however it is rotating on the wrong axis.
  2. Right hand does not move at all.
  3. I have unanchored head and I would expect it fall on the ground, however it clips partially into the ground and then moves along with my head as if ignoring the floor.

What could be causing these strange behaviors.

\$\endgroup\$
0

0

You must log in to answer this question.

Browse other questions tagged .