Hey!
By following a tutorial, I made a ViewModel that shows the player arms once he starts running. The problem is that it is a bit buggy. Depending the angle you look, one of the arms disappears or becomes barely visible.
By removing the CameraOffset you can see the mess that is happening:
Here’s the script:
-- in StarterCharacterScripts
local RS = game:GetService("RunService")
local VM = game:GetService("ReplicatedStorage"):WaitForChild("Game_Stuff"):WaitForChild("ViewModel")
local Char = script.Parent
VM.Parent = workspace.CurrentCamera
local lArm = Char.LeftUpperArm.LeftShoulder
local rArm = Char.RightUpperArm.RightShoulder
RS.RenderStepped:Connect(function()
VM:PivotTo(workspace.CurrentCamera.CFrame)
local dist = (workspace.CurrentCamera.CFrame.Position - Char.Head.Position).Magnitude
if dist < 1 then
lArm.Part0 = VM.UpperTorso
rArm.Part0 = VM.UpperTorso
else
lArm.Part0 = Char.HumanoidRootPart
rArm.Part0 = Char.HumanoidRootPart
end
end)
ViewModel:
Thank you for your attention!