How can I script an ADS system into this auto-viewmodel script-thingy
local player = game.Players.LocalPlayer
local character = player.Character
if not character or not character.Parent then
character = player.CharacterAdded:wait()
end
local torso = character:WaitForChild("Torso")
local rightShoulder = torso:WaitForChild("Right Shoulder")
local leftShoulder = torso:WaitForChild("Left Shoulder")
local camera = game.Workspace.CurrentCamera
updateSpeed = 0.5/2
while true do
game:GetService("RunService").RenderStepped:wait()
character["Right Arm"].LocalTransparencyModifier = character["Right Arm"].Transparency
character["Left Arm"].LocalTransparencyModifier = character["Left Arm"].Transparency
local cframe
if character:FindFirstChildOfClass("Tool") and character:FindFirstChildOfClass("Tool").CanAim.Value == true then then
--what should i do here, the aim attachment is inside of the Tool.Handle
else
cframe = game.Workspace.CurrentCamera.CFrame
end
local distance = (character.Head.Position - cframe.p).magnitude
if distance <= 1.5 then
rightShoulder.C0 = rightShoulder.C0:lerp((cframe * CFrame.new(1, -1, 0)):toObjectSpace(torso.CFrame):inverse() * CFrame.Angles(0, math.pi/2, 0), updateSpeed)
leftShoulder.C0 = leftShoulder.C0:lerp((cframe * CFrame.new(-1, -1, 0)):toObjectSpace(torso.CFrame):inverse() * CFrame.Angles(0, -math.pi/2, 0), updateSpeed)
else
rightShoulder.C0 = rightShoulder.C0:lerp(CFrame.new(1, 0.5, 0) * CFrame.Angles(0, math.pi/2, 0),updateSpeed)
leftShoulder.C0 = leftShoulder.C0:lerp(CFrame.new(-1, 0.5, 0) * CFrame.Angles(0, -math.pi/2, 0),updateSpeed)
end
end