Hey, i do not understand what is wrong with my script. Can anyone help me?
Error:

Folders:


SCRIPT:
local RunS = game:GetService("RunService")
local RepS = game:GetService("ReplicatedStorage")
local UIS = game:GetService("UserInputService")
local Char = script.Parent
local LeftShoulder = Char.Torso["Left Shoulder"]
local RightShoulder = Char.Torso["Right Shoulder"]
local Viewmodel = RepS.Viewmodels.Viewmodel:Clone()
Viewmodel.Parent = workspace.CurrentCamera
RunS.RenderStepped:Connect(function()
local function ItemAnim (AnimationName,Play,Stop)
for i,Reference in pairs(RepS.Items:GetChildren()) do
local ItemName = Char:FindFirstChild(Reference.Name)
if ItemName then
local plr = game:GetService("Players").LocalPlayer
local AnimFolder = plr.PlayerScripts:FindFirstChild(ItemName)
local Anim = AnimFolder:WaitForChild(AnimationName)
local LoadAnim = Char.Humanoid:LoadAnimation(Anim)
LoadAnim:Play()
end
end
end
Viewmodel:SetPrimaryPartCFrame(workspace.CurrentCamera.CFrame)
local Distance = (workspace.CurrentCamera.CFrame.Position - Char.Head.Position).Magnitude
if Distance < 1 then
ItemAnim("Idle",true,false)
Char:FindFirstChild("Right Arm").LocalTransparencyModifier = .5 ; Char:FindFirstChild("Right Arm").CastShadow = false
Char:FindFirstChild("Left Arm").LocalTransparencyModifier = .5 ; Char:FindFirstChild("Left Arm").CastShadow = false
Char:FindFirstChild("Right Leg").LocalTransparencyModifier = .5 ; Char:FindFirstChild("Right Leg").CastShadow = false
Char:FindFirstChild("Left Leg").LocalTransparencyModifier = .5 ; Char:FindFirstChild("Left Leg").CastShadow = false
RightShoulder.Part0 = Viewmodel.Torso
LeftShoulder.Part0 = Viewmodel.Torso
else
ItemAnim("Idle",false,true)
RightShoulder.Part0 = Char.Torso
LeftShoulder.Part0 = Char.Torso
end
end)
local function onInputBegan(input,Processed)
if UIS:IsMouseButtonPressed(Enum.UserInputType.MouseButton2) then
print("Aiming")
end
end
UIS.InputBegan:Connect(onInputBegan)
