I’m trying to make a viewport character similar to Weaponry
But I keep getting errors, how can I achieve this?
local player = game:GetService("Players").LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local main_frame = script.Parent.main_frame
local viewport_frame = main_frame.ViewportFrame
local VPFcamera = Instance.new('Camera'); VPFcamera.Parent = viewport_frame
VPFcamera.CFrame = CFrame.new(0,0,0)
viewport_frame.CurrentCamera = VPFcamera
VPFcamera.FieldOfView = 17
repeat wait(.1) until game:IsLoaded()
character.Archivable = true
local clonedChar = character:Clone()
clonedChar.Parent = viewport_frame.WorldModel
clonedChar.Humanoid.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
clonedChar:SetPrimaryPartCFrame(CFrame.new(Vector3.new(0,0,-9.5), Vector3.new(0,0,0)))