wait(2) local player = game.Players.LocalPlayer local character = game.Players.LocalPlayer.Character local cam = game.Workspace.CurrentCamera local coframe = cam.CoordinateFrame.p local lvector = game.Workspace.CurrentCamera.CoordinateFrame.lookVector character.Archivable = true charactercopy = character:Clone() charactercopy.Parent = container charactercopy:MoveTo(Vector3.new(30,30,30)) while charactercopy ~= nil do local lvector = game.Workspace.CurrentCamera.CoordinateFrame.lookVector local coframe = cam.CoordinateFrame.p local pos = CFrame.new(lvector*20 + coframe) --hint ben, i only want the position print(pos) --print(lvector) --print(coframe) charactercopy:MoveTo(pos) --20 is how far away from the camera charactercopy:MoveTo( (lvector*20 + coframe ) ) wait(1) print(charactercopy.Torso.Position) end
At line 20, the there is an error "16:29:22.819 - Unable to cast CoordinateFrame to Vector3 16:29:22.820 - Script 'Players.Player1.PlayerGui.LocalScript', Line 20". I need to make the clone move to to the (lvector*20 + coframe) (between the camera and what its looking at. Any help converting coframe and lvector to Vector3 values?