You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? I want to make the arms go in all directions including left and right not only up and down.
-
What is the issue? Include screenshots / videos if possible! The issue is whenever I go into first person, the arms just go into random places. I had recently copied this code from another post, but it doesnt seem to fit what I want.
-
What solutions have you tried so far? I have looked over devforum but none of them seem to fit what I need.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local RunService = game:GetService("RunService")
local player = Players.LocalPlayer
local char = player.Character
local mouse = player:GetMouse()
--Weld for the cframing plus motor6ds are out of my league and animations will still work like nothing happen to it
local armWeld = Instance.new("Weld")
armWeld.Part0 = char.Torso
armWeld.Part1 = char:WaitForChild("Right Arm")
armWeld.Parent = char
--pi/2 is also known as 90 deg.(just wanted to point this out lol)
local piDiv2 = -math.pi/2
RunService.Heartbeat:Connect(function()
local CFraming = CFrame.new((char.Torso.CFrame * CFrame.new(1.5, 0.5, 0)).Position, mouse.Hit.Position) * CFrame.new(0, 0, -0.5) * CFrame.Angles(piDiv2, 0, 0)
armWeld.C0 = char.Torso.CFrame:ToObjectSpace(CFraming)
end)
I would like some help with this. Thanks!