Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Look at mouse (Motor6D) (Y only) script is not working correctly (?)

Asked by
tomekcz 174
4 years ago
local Torso = Character.UpperTorso
local Arm = Character.RightUpperArm.RightShoulder
local Character = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:wait()
local mouse = game.Players:GetMouse()

RunService.RenderStepped:Connect(function()


    local Argument = (CFrame.new(Arm.Parent.Position,               mouse.Hit.p)):toObjectSpace(Torso.CFrame * Arm.C0)
    Arm.C1 = Argument

end)

(character is r15)

Answer this question