VR Service detects mobile people as VR?
Asked by
5 years ago Edited 5 years ago
Hello.
I made a game all about VR. The VR person has their own nametag and it's customized like the character. When a mobile player joined, it changed the VR person to be just like him, he still had control and all, it just changed to be the mobile player. Is there any way to fix this? Thank you!
EDIT: This game is a VR-Hangout type. So other people can play.
LocalScript:
01 | local VR = game:GetService( "VRService" ) |
02 | local replicatedfirst = game:GetService( "ReplicatedFirst" ) |
03 | local input = game:GetService( "UserInputService" ) |
04 | local event = game.ReplicatedStorage:WaitForChild( "SetPosition" ) |
06 | game.ReplicatedStorage.LoadCharacter:FireServer() |
08 | event:FireServer(VR:GetUserCFrame(Enum.UserCFrame.RightHand),VR:GetUserCFrame(Enum.UserCFrame.LeftHand),VR:GetUserCFrame(Enum.UserCFrame.Head)) |
Script:
1 | local headpart = workspace [ " " ] |
2 | local Event = game.ReplicatedStorage.SetPosition |
3 | Event.OnServerEvent:connect( function (player,right,left,head) |
4 | headpart.Head.CFrame = head |
5 | workspace.righthand.CFrame = right |
6 | workspace.lefthand.CFrame = left |
My camera script (It also has some problems):
01 | script.Parent:WaitForChild( "ScreenGui" ).Enabled = true |
02 | local camera = workspace.CurrentCamera |
03 | local player = game.Players.LocalPlayer |
04 | local vr = game:GetService( "VRService" ) |
06 | game.ReplicatedStorage:WaitForChild( "SetNametag" ):FireServer() |
07 | print ( "Starting Camera Code..." ) |
09 | camera.CameraType = Enum.CameraType.Scriptable |
10 | until camera.CameraType = = Enum.CameraType.Scriptable |
11 | camera.CFrame = CFrame.new( 0 , 0 , 0 ) |
12 | print ( "Finished Camera Code." ) |