i keep getting the error "Unable to assign property Position. Vector3 expected, got CFrame "
(i am bad at scripting)
and even if it got fixed i dont know if the viewmodel would show
heres my code:
local run = game:GetService("RunService")
local RS = game:GetService("ReplicatedStorage")
local plr = game.Players.LocalPlayer
local char = plr.Character
local GunModels = RS:WaitForChild("GunModels")
local GunModules = RS:WaitForChild("GunModules")
local Viewmodel = GunModels["DSA SA58 Viewmodel"]
--cloning the viewmodel
local clone = Viewmodel:Clone()
run.RenderStepped:Connect(function()
--changing parent
clone.Parent = workspace
--putting the viewmodel in front of players camera/head
clone.PrimaryPart.Position = char.Head.CFrame * CFrame.new(-5.33, 0, 0)
end)

2 comments
thank you this really helped
If im correct the viewmodels parent needs to be the players camera. You can do this by defining the camera: local cam = workspace.CurrentCamera) and making that the clones parent!