I want to make the character’s arms (R6) rotate relative to the camera.
The issue is that with my current script, it does not move relative to the camera.
What I have:
What I want to achieve:
my script:
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local mouse = player:GetMouse()
local torso = character:WaitForChild("Torso")
local rightS = torso:WaitForChild("Right Shoulder")
local leftS = torso:WaitForChild("Left Shoulder")
game["Run Service"].RenderStepped:Connect(function()
character["Left Arm"].LocalTransparencyModifier = 0
character["Right Arm"].LocalTransparencyModifier = 0
local hit = (torso.Position.Y - mouse.Hit.Position.Y)/100
local mag = (torso.Position - mouse.Hit.Position).Magnitude/100
local offset = hit/mag
rightS.C0 = rightS.C0:Lerp(CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) * CFrame.fromEulerAnglesXYZ(0, 0, -offset), 0.3)
leftS.C0 = leftS.C0:Lerp(CFrame.new(-1, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, offset), 0.3)
end)
the gun was free model
The script is not mine (I used to have a script for this, but my stupid brain forgot where it was )
I looked at the devforum, and I couldn’t find any solutions for this other than “create a view model”
edit: script that I had did the same thing that I have rn