You can write your topic however you want, but you need to answer these questions:
- What do you want to achieve? Keep it simple and clear!
I am studying VRService to make my own vr game so I copied the ROBLOX dev hub script.
- What is the issue? Include screenshots / videos if possible!
It doesn’t seem to be tracking
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I have searched around all places I know and I have tried changing small stuff.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
Almost the same as the one on developer hub.
local VRService = game:GetService("VRService")
local players = game:GetService("Players")
local player = players.LocalPlayer
local character = player.CharacterAdded:Wait()
local head = game.Workspace.Baseplate
local function TrackHead(inputType, value)
if inputType == Enum.UserCFrame.Head then
head.CFrame = value
end
end
if VRService.VREnabled then
-- Set the inital CFrame
VRService:RecenterUserHeadCFrame()
head.CFrame = VRService:GetUserCFrame(Enum.UserCFrame.Head)
-- Track VR headset movement and mirror for character's head
VRService.UserCFrameChanged:Connect(TrackHead)
end```
Please do not ask people to write entire scripts or design entire systems for you. If you can't answer the three questions above, you should probably pick a different category.