I’ve been trying for a while now to get the
player character in the GUI! I have experimented a bit with viewport frames but the only way to display the character is to clone it! But I also want to show what the player is doing. Something like in “Entry Point”. I tried to just refresh the player again per frame, which works but takes a lot of power. In addition, I think that the script could be improved!
I made a basic one a couple of days ago, i can share it with you. As @Vibe90K said, you are cloning your character into a viewport frame every frame.
local viewPortFrame = script.Parent:WaitForChild("ViewportFrame")
local char = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()
char.Archivable = true
local newCamera = Instance.new("Camera")
newCamera.Parent = viewPortFrame
viewPortFrame.CurrentCamera = newCamera
if clonedChar then clonedChar:Destroy() end
clonedChar = char:Clone()
local hrp = clonedChar:WaitForChild("HumanoidRootPart")
newCamera.CFrame = CFrame.new(hrp.Position + (hrp.CFrame.LookVector * 6) + Vector3.new(0,2,0) + (hrp.CFrame.RightVector * 2), hrp.Position)
--I fiddled around with the position of the camera so you get a little bit of a side on view.
clonedChar.Parent = viewPortFrame