Hello, I’ve had a slight issue involving a part following a camera using CFrames, any help is appreciated.
THE SCRIPT
wait()
local plr = script.Parent.Parent
local char = workspace:findFirstChild(plr.Name)
local cam = workspace.CurrentCamera
local larm = workspace.larm
game:GetService("RunService").RenderStepped:Connect(function()
larm.CFrame = cam.CFrame * CFrame.new(-1,-0.6,-0.4) * CFrame.fromEulerAnglesXYZ(0,50,20)
end)
The script works fine, however would like to make the part (larm) not look so stiff, e.g so it slightly moves around like an arm. I’m wondering how I would go about this as I have tried to use math.random() and have tried inputting some math.deg values, however it results in the arm moving slightly too much than wanted.
Also, I was wondering how I would involve a tween / lerp in this instance as I assume one is needed (might be wrong).
Many thanks for reading this and helping a new scripter improve,