R15 To R6 ViewModel broken

I tried to turn my R15 viewmodel to R6 but the hands are like fully broken now.
On R15 i used :PivotTo() and the hands positioned perfectly on the camera but on the R6 model its all broken, this is what happenes if i use :PivotTo() on R6


But if i use
ViewModel:SetPrimaryPartCFrame(camera.CFrame) the gun and viewmodel work perfectly. The point of this post is that I dont want to use :SetPrimaryPartCFrame since its deprecated

1 Like

Are any errors present when the code is run? You should also not that chances may be the way your R15 view model has been configured may be different to the R6 model.

Snippets of code can be useful, and a way to debug this for yourself would be to print the value of camera.CFrame etc to check whether the view model is actually working or whether values are missing.

1 Like

Pretty straight forward so a code sample is not needed im pretty sure.
Its just a RenderStepped

RunService.RenderStepped:Connect(function()
	--ViewModel:PivotTo(camera.CFrame) --This is the broken one
	--ViewModel:SetPrimaryPartCFrame(camera.CFrame) --deprecated
end)

If you would like to see how your code is actually working I would likely suggest setting it to a part you can visually see as opposed to the camera - as we know the camera.CFrame is a value always moving to our camera we obviously cannot visualise the solution off that:

RunService.RenderStepped:Connect(function()
	ViewModel:PivotTo(APartWeCanSee.CFrame) --This is the broken one
end)

You can then get an idea what is going wrong. You can also use the R15 example to further debug the problem as you’ll be able to see a working vs a non-working example.

Chances are I can see a shadow of what seems like an arm, you might need to have to set the primary part or something in the model - this might be why its inaccurate.

Nevermind found my solution, i just had to edit the pivot or reset it with the built in roblox tool

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.