of     1   

Scrippa
#182881703Tuesday, February 02, 2016 3:09 PM GMT

Making it look at mouse position isn't a problem, what I can't figure out is to make it rotate on only 1 axis, up and down. local Plr = game.Players.LocalPlayer local mouse = Plr:GetMouse() local Char = Plr.Character local torso = Char.Torso local sh = torso["Right Shoulder"] game:service("RunService").RenderStepped:connect(function() local cf = CFrame.new((torso.CFrame * CFrame.new(1,0.5,0)).p, mouse.Hit.p) sh.C0 = torso.CFrame:toObjectSpace(cf) * CFrame.Angles(0,math.pi/2,math.pi/2) end) Pls
Scrippa
#182886173Tuesday, February 02, 2016 6:09 PM GMT

bump
ez_street
#182888594Tuesday, February 02, 2016 7:25 PM GMT

local player = game.Players.LocalPlayer local Mouse = player:GetMouse() local character = player.Character local shoulder = character.Torso["Right Shoulder"] local origin = shoulder.C0 Mouse.Move:connect(function() local position = Mouse.Hit.p local arm = character["Right Arm"] local SP = (arm.Position.Y - position.Y) local distance = (arm.Position - position).magnitude local formula = math.atan(SP/distance) shoulder.C0 = origin*CFrame.fromEulerAnglesXYZ(formula,0,0) end I think that should work. I've done it with a character's neck before, so it should be the same principal.
Scrippa
#182928881Wednesday, February 03, 2016 11:51 AM GMT

the arm moves but doesn't look at mouse position, also what is math.atan? I'm HORRIBLY bad at math, a 6th grader knows more than me
vlekje513
#182930732Wednesday, February 03, 2016 1:40 PM GMT

atan2() is hard has something to do with tangus iirc
Scrippa
#184141395Monday, February 22, 2016 2:35 PM GMT

bump
iondriver
#184147020Monday, February 22, 2016 5:46 PM GMT

math.atan() is the function for the arctangent or tan^-1. It is the inverse of math.tan()
Scrippa
#184147188Monday, February 22, 2016 5:50 PM GMT

I'm horribly bad at math I have no idea what atan is(i don't even know things that may be easy for you such as trigonometry), can't use that
iondriver
#184147345Monday, February 22, 2016 5:55 PM GMT

atan is a trigonometric function. When given a distance, it returns that angle between two points separated from each other by that distance. I would highly recommend looking into trig functions, they are incredibly useful. Here is a link to get you started. (hope it doesn't filter) http://www.intmath.com/trigonometric-functions/trig-functions-intro.php
Scrippa
#184147496Monday, February 22, 2016 5:59 PM GMT

Ty, I'm gonna try learning trigonometry, gotta find a "tutorial" or whatever in my native language tho

    of     1