repeat wait() until game:GetDescendants()
local runService = game:GetService("RunService")
local character = script.Parent
local viewmodel = game:GetService("ReplicatedStorage"):WaitForChild("Viewmodel")
viewmodel.Parent = workspace.CurrentCamera
local torso = character:WaitForChild("Torso")
local viewmodelTorso = viewmodel:WaitForChild("Torso")
local leftShoulder = torso:WaitForChild("Left Shoulder")
local rightShoulder = torso:WaitForChild("Right Shoulder")
runService.RenderStepped:Connect(function()
character:FindFirstChild("Right Arm").LocalTransparencyModifier = 0
character:FindFirstChild("Left Arm").LocalTransparencyModifier = 0
viewmodel:SetPrimaryPartCFrame(workspace.CurrentCamera.CFrame)
local distance = (workspace.CurrentCamera.CFrame.Position - character.Head.Position).Magnitude
if distance < 1 then
rightShoulder.Part0 = viewmodelTorso
leftShoulder.Part0 = viewmodelTorso
else
rightShoulder.Part0 = torso
leftShoulder.Part0 = torso
end
end)
Any ideas would be helpful