How can I clone the player character and put it in a ViewPortFrame?

Well, I have tried to clone the player character and for some reason nothing works for me. I thought the script would work but it doesn’t clone the character

local ViewPortFrame = script.Parent.Inventario.ImageLabel:WaitForChild("ViewportFrame")

game.Loaded:Wait()

local player = game.Players.LocalPlayer
local character = workspace:FindFirstChild(player.Name)

local CloneCharacter = character:Clone()
CloneCharacter.Parent = ViewPortFrame

Is this on a localscript? I’ve encountered this before but I need a refresher.

in effect, it is a local script

Ok, I think you can clone it in a server script. What I did was clone the character and deleted the scripts, then put the character model under the player. Then you should be able to clone that model.

2 Likes