What solutions have you tried so far? Did you look for solutions on the Developer Hub?
nobody cuz they use part as a viewportframe
--idk how can i code here
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.
ok
i already tried cloning the character into the viewport frame, but it doenst work cuz it doenst allow cloning character into it
fake character for client… i already tried using something like this
local plr = game.players etc:clone()
plr.parent = viewport
it says attempt to index with :clone()
Well the function takes a players ID as the first parameter. This will get the appearance of the player of the player ID. Then you would use Humanoid:ApplyDescription and use the Players:GetHumanoidDescriptionFromUserId() function as the parameter.
Here’s a script I made a while back. You need to specify the ViewportFrame used.
local viewport = yourviewportframehere
local char = game:GetService("Players").LocalPlayer.Character
local cam = Instance.new("Camera",viewport)
game:GetService("RunService").RenderStepped:Connect(function()
for i,v in pairs(viewport.Character1:GetDescendants()) do
v:Destroy()
end
for i,v in pairs(char:GetChildren()) do
local v2 = v:Clone()
if v2:IsA("Script") or v2:IsA("LocalScript") or v2:IsA("ModuleScript") then
v2:Destroy()
else
v2.Parent = viewport.Character1
if v2:IsA("Humanoid") then
v2.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
end
end
end
viewport.CurrentCamera = cam
cam.CFrame = game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.CFrame * CFrame.new(0,0,-5) * CFrame.Angles(0,math.rad(180),0)
end)
If you were to put it inside the viewport you would use it this way:
local viewport = script.Parent
local char = game:GetService("Players").LocalPlayer.Character
local cam = Instance.new("Camera",viewport)
game:GetService("RunService").RenderStepped:Connect(function()
for i,v in pairs(viewport.Character1:GetDescendants()) do
v:Destroy()
end
for i,v in pairs(char:GetChildren()) do
local v2 = v:Clone()
if v2:IsA("Script") or v2:IsA("LocalScript") or v2:IsA("ModuleScript") then
v2:Destroy()
else
v2.Parent = viewport.Character1
if v2:IsA("Humanoid") then
v2.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
end
end
end
viewport.CurrentCamera = cam
cam.CFrame = game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.CFrame * CFrame.new(0,0,-5) * CFrame.Angles(0,math.rad(180),0)
end)
StarterGui is not the same as the PlayerGui. StarterGui clones all the objects you put into it into each player’s PlayerGui object when they join the game. Editing StarterGui while the game is running does not edit the gui in the player’s PlayerGui object.