RunService.RenderStepped:Connect(rightHandIndicator, leftHandIndicator)Īll the server-sided code. UserInputService.UserCFrameChanged:Connect(handCorrection) UserInputService.InputEnded:Connect(inputHandling) UserInputService.InputBegan:Connect(inputHandling) ReplicateHands:FireServer(Character, RightSendingCFrame, LeftSendingCFrame) Local headCFrame = VRService:GetUserCFrame()Ĭamera.CFrame = CFrame.new(raycastResult.Position + Vector3.new(0, 5 +, 0) - headCFrame.Position) * cameraAngles Local raycastResult = game.Workspace:Raycast(origin, direction, RaycastParams.new()) Local LeftHand = createHand("LeftVRHand") Local RightHand = createHand("RightVRHand") StarterGui:SetCore("VREnableControllerModels", 0)Ĭ = true StarterGui:SetCore("VRLaserPointerMode", 0) Camera properties, disable default movement and freeze non-VR character.Ĭamera.CameraType = Ĭamera.CFrame = CFrame.new() Local Players = game:GetService("Players") Local StarterGui = game:GetService("StarterGui") Local UserInputService = game:GetService("UserInputService") Local RunService = game:GetService("RunService") Local VRService = game:GetService("VRService") Update:FireClient("Teleported", RightHand.CFrame, LeftHand.CFrame, Head.CFrame, CrazySphere.CFrame, LeftHand.The client-script. If part.Parent:FindFirstChild("CrazySphere") then What I am currently usng to teleport it is by changing the CFrame of each part of the vr player to the CFrame of the location I want them to be at. I’ve tried updating the cilent side with Update:FireCilent but it just says unable to cast value to Object. Whenever I touch the part it only teleports the vr character on the server side, and it also isn’t exactly how I want it to teleport the player, like it messes up the cframe and just piles the vr player into one spot. I would like to make it so whenever a specific part (that being the ball because I am using ball movement) connected to the vr player touches a teleport pad it will teleport them to another part.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |