Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

[Answered] How do I make a character in game into a Ui image?

Asked by 5 years ago
Edited 5 years ago

I want to make an image that has the player's avatar in game on it. How do I do this?

2 answers

Log in to vote
1
Answered by 5 years ago

Nice! Also, if you ever need to make this into a 2d image, you can use this to get the avatar from the user.

If you plan on using this in a LocalScript you can use local Player = game.Players.LocalPlayer to get the Player.Name.

Ad
Log in to vote
1
Answered by 5 years ago

I got it thanks to jensar141215!

01char = game.Players.LocalPlayer.Character
02cam = Instance.new("Camera",script.Parent)
03--local par = script.Part
04game:GetService("RunService").RenderStepped:Connect(function()
05    for i,v in pairs(script.Parent.ViewportFrame.Character1:GetDescendants()) do
06        v:Destroy()
07    end
08    for i,v in pairs(char:GetChildren()) do
09    local v2 = v:Clone()
10    if v2:IsA("Script") or v2:IsA("LocalScript") or v2:IsA("ModuleScript") then
11        v2:Destroy()
12    else
13    v2.Parent = script.Parent.ViewportFrame.Character1
14    if v2:IsA("Humanoid") then
15        v2.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
View all 24 lines...

Answer this question