-- enable the viewmodel system

local function enableviewmodel()
	isfirstperson = true
	if viewmodel.Parent ~= workspace.CurrentCamera then
		viewmodel.Parent = workspace.CurrentCamera
	end
	if rigtype == "R15" then
		-- disable character joints, enable viewmodel joints
		rightshoulderclone.Enabled = true
		leftshoulderclone.Enabled = true
		-- disable real shoulders
		leftshoulder.Enabled = true
		rightshoulder.Enabled = true
		--
		rightshoulderclone.Part1 = rarm
		rightshoulderclone.Part0 = faketorso
		rightshoulderclone.Parent = faketorso
		--
		leftshoulderclone.Part1 = larm
		leftshoulderclone.Part0 = faketorso
		leftshoulderclone.Parent = faketorso
		--
		armtransparency = firstperson_arm_transparency
	else
		--
		rightshoulderclone.Enabled = true
		leftshoulderclone.Enabled = true
		-- disable real shoulders
		leftshoulder.Enabled = false
		rightshoulder.Enabled = false
		--
		rightshoulderclone.Part1 = rarm
		rightshoulderclone.Part0 = faketorso
		rightshoulderclone.Parent = faketorso
		--
		leftshoulderclone.Part1 = larm
		leftshoulderclone.Part0 = faketorso
		leftshoulderclone.Parent = faketorso
		
		--larm.Anchored = true
		--rarm.Anchored = true
		--
		armtransparency = firstperson_arm_transparency
	end
end

