RunService.RenderStepped:Connect(OnRenderStep) Joint.C0 = CFrame.lookAt(Joint.C0.Position, Vector3.new(, Joint.C0.Position.Y, )) * if RigType = "R6" then CFrame.Angles(math.pi / 2, math.pi, 0) else CFrame.Angles(0, 0, 0) Local Joint = Limb:FindFirstChild("Neck") or Limb:WaitForChild("Neck") Local Limb = if RigType = "R6" then Character:FindFirstChild("Torso") or Character:WaitForChild("Torso") elseif RigType = "R15" then Character:FindFirstChild("Head") or Character:WaitForChild("Head") else nil Local Humanoid = Character:FindFirstChildOfClass("Humanoid") or Character:WaitForChild("Humanoid") Local Character = Player.Character or Player.CharacterAdded:Wait() Local Players = Game:GetService("Players") Local RunService = Game:GetService("RunService") The following is compatible with both avatar types. Local value = CFrame.Angles(-math.asin(theplace.Y)+5,0,math.asin(theplace.X)+84.75)Īssuming you just want the character’s head to rotate around the Y-axis. Theplace = :toObjectSpace(camera.CFrame).lookVector theplace = :toObjectSpace(mouse.Hit).lookVector Local neck = Plr.Character:WaitForChild("Torso"):WaitForChild("Neck") I have a script that just plays a tween with the given cframe local Plr = This is the full code to the local script
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |