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

How to make Motor6D's arm look at mouse?? please help!!

Asked by
tomekcz 174
5 years ago

script is located in StarterCharacterScripts and it is LOCALSCRIPT

--------------------------VARIBLES-------------------------------------------

local Mouse = game.Players.LocalPlayer:GetMouse()

local player_model = script.Parent

local player_arm = player_model:FindFirstChild("LeftUpperArm")

local arm_motor = player_arm:FindFirstChild("LeftShoulder")

--------------------------VARIBLES-------------------------------------------



Mouse.Move:Connect(function()

arm_motor.Transform = CFrame.new(Vector3.new(0,0,0), Mouse.Hit.p)

end)

Answer this question