Waist.C0 = Waist.C0:lerp(WaistOriginC0 * CFrame.Angles(-(math.atan(Difference / Distance) * 0.5), (((HeadPosition - Point).Unit):Cross(TorsoLookVector)).Y * 0.5, 0), 0.These percentages are based on and apply to the standard/default character size. Neck.C0 = Neck.C0:lerp(NeckOriginC0 * CFrame.Angles(-(math.atan(Difference / Distance) * 0.5), (((HeadPosition - Point).Unit):Cross(TorsoLookVector)).Y * 1, 0), 0.5 / 2) If Camera.CameraSubject:IsDescendantOf(Character) or Camera.CameraSubject:IsDescendantOf(Player) then If Character:FindFirstChild("UpperTorso") and Character:FindFirstChild("Head") then Local CameraCFrame = Camera.CoordinateFrame RunService.RenderStepped:Connect(function() Local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart") Local Humanoid = Character:WaitForChild("Humanoid") Local Waist = Torso:WaitForChild("Waist") Local Torso = Character:WaitForChild("UpperTorso") Local Head = Character:WaitForChild("Head") Local Character = Player.Character or Player.CharacterAdded:Wait() Hello! Try this! local RunService = game:GetService("RunService") Neck.C0 = normalC0 * CFrame.Angles(-(math.atan(Difference / Distance) * 0.5), (((head.Position - pos).Unit):Cross()).Y * 1, 0) Local torso = script.Parent:WaitForChild("Torso")ĬhangeYEvent.OnServerEvent:Connect(function(player, pos, Y) Local head = script.Parent:WaitForChild("Head") Server script I used: local neck = script.Parent:WaitForChild("Torso"):WaitForChild("Neck") Game:GetService("RunService").RenderStepped:Connect(function(deltaTime)ĬhangeYEvent:FireServer(, .Y) Local changeYEvent = script.Parent:WaitForChild("ChangeY") Hey there! I am trying to make a characters head follow the mouse in one axis, but I just can’t seem to do it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |