Hi,
All I need is something very simple; How do I Make Arms Move with Camera?.
Someone gave me a script a few days ago but it’s very glitchy.
Local Script in StarterGui:
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:wait()
local event = game.ReplicatedStorage:WaitForChild("Events"):WaitForChild("moveArms")
local humanoid = character:WaitForChild("Humanoid")
local torso = character:WaitForChild("Torso")
local rightShoulder = torso:WaitForChild("Right Shoulder")
local leftShoulder = torso:WaitForChild("Left Shoulder")
local camera = game.Workspace.CurrentCamera
updateSpeed = 0.4
character:WaitForChild("Right Arm")
character:WaitForChild("Left Arm")
game:GetService("RunService").Stepped:Connect(function()
local camCF = camera.CoordinateFrame
local distance = (character.Head.Position - camCF.p).magnitude
if humanoid.Health ~= 0 then
event:FireServer(rightShoulder, rightShoulder.C0:lerp((camCF * CFrame.new(1, -1, 0)):toObjectSpace(torso.CFrame):inverse() * CFrame.Angles(0, math.pi/2, 0), updateSpeed), leftShoulder, leftShoulder.C0:lerp((camCF * CFrame.new(-1, -1, 0)):toObjectSpace(torso.CFrame):inverse() * CFrame.Angles(0, -math.pi/2, 0), updateSpeed))
else
event:FireServer(rightShoulder, CFrame.new(1, 0.5, 0) * CFrame.Angles(0, math.pi/2, 0), leftShoulder, CFrame.new(-1, 0.5, 0) * CFrame.Angles(0, -math.pi/2, 0))
end
end)
Server Script in ServerScriptService:
game.ReplicatedStorage:WaitForChild("Events"):WaitForChild("moveArms").OnServerEvent:Connect(function(plr, one, oneC, two, twoC)
one.C0 = oneC
if two ~= nil then
two.C0 = twoC
end
end)
Does anyone have a script, or is willing to help make mine less glitchy?