I made view models but they’re keep falling off.
Video: - YouTube
How would I be able to fix this?
Script:
local tool = script.Parent
local rep = game:GetService("ReplicatedStorage")
tool.Equipped:Connect(function()
if game.Workspace.CurrentCamera:FindFirstChild("Arms") then
game.Workspace.Arms:Destroy()
else
local arms = rep:FindFirstChild("v_"..tool.Name):Clone()
arms.Name = "Arms"
arms.Parent = game.Workspace.CameraSubject
end
end)
I don’t typically program view models so you might have to debug and test this a bit, but I think you would need to weld the view model every time the tool is equipped. This means creating a new Weld or Motor6D, parenting it to the character’s model (HumanoidRootPart maybe?) setting its Part0 and Part1 properties to be the HumanoidRootPart (or other part in the character) and a PrimaryPart of the view model, respectively. You can then play around with the C0 and C1 properties to get the view model showing up at the right offset in front of the Camera.