how to make like this?
the player avatar
You must use VeiwPortFrames, clone the players avatar inside of it and set the current camera to face the player.
Using “ViewportFrames” you can render 3D objets into a gui like that and using RunService to render the character into the Gui, so first insert a ViewportFrame into some gui and insert a Model into the ViewportFrame (The model is the place where we will place the cloned character so remember to make a Model and NOT a Folder) and we script it:
l ocal Players = game:GetService(“Players”)
local RunService = game:GetService(“RunService”)
local Character = game.Players.LocalPlayer.Character
local Camera = Instance.new("Camera")
Camera.Parent = script.Parent
RunService.RenderStepped:Connect(function() -- Rendering Character
for _,v in pairs(Character:GetDescendants()) do -- Cloning Character
local c = v:Clone()
c.Parent = script.Parent.ViewportFrame.Model -- Placing Character
if c:IsA("Humanoid") then
c.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None -- Making better Humanoid
end
end
script.Parent.ViewportFrame.CurrentCamera = Camera -- Camera
Camera.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame * CFrame.new(0,3,-5) * CFrame.Angles(math.rad(30),math.rad(180),0) -- This is the camera angle
end)
I hope this helps you!
how to fix it?