Im making a death screen and i want a highlight of the players character to be seen over the deathscreen animation.
How do i do that though?
Pretty sure you can’t do that as highlights are suppose to be below the gui. Though, you could make a part the size of your screen and put the gui on it? Make sure AlwaysOnTop is off though.
maybe idk, maybe i could use a viewport frame and wierd manipulation?
Yes, you may be able to create a viewport frame with a transparent background and the CFrame set to the cameras CFrame. Then, clone the body into the viewport frame. With some changes to the lighting and color/material of the body parts, you can have a cool body overlay.
Took some time off my day, here’s the quickest way to do what ur trying to do (highlights don’t work on viewportframe by the way, I think…)
youtube.com/watch?v=OraCHLTq4Uc&feature=youtu.be
- note: don’t place in startercharacter, screengui please
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local Character = LocalPlayer.Character
local CurrentCamera = workspace.CurrentCamera
local ViewportSizeX = CurrentCamera.ViewportSize.X
local ViewportSizeY = CurrentCamera.ViewportSize.Y
local PlayerGui = LocalPlayer:WaitForChild("PlayerGui")
local ScreenGui = PlayerGui:WaitForChild("ScreenGui")
--
function clone_character(char)
char.Archivable = true
local clone = char:Clone()
local toilet = {
Part = true,
Accessory = true,
MeshPart = true,
}
-- flush the poop & keep the player
char.Archivable = not char.Archivable
for _,poop in clone:GetChildren(), next do
if not toilet[poop.ClassName] then
poop:Destroy()
end
end
return clone
end
local function character_to_viewport_frame()
--create vpf
local viewport_frame = Instance.new("ViewportFrame")
viewport_frame.Position = UDim2.fromScale(0.5, 0.5)
viewport_frame.AnchorPoint = Vector2.new(0.5, 0.5)
viewport_frame.Size = UDim2.fromOffset(ViewportSizeX, ViewportSizeY)
viewport_frame.BackgroundTransparency = 1
viewport_frame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
viewport_frame.Ambient = Color3.fromRGB(0, 0, 0)
viewport_frame.LightColor = Color3.fromRGB(0, 0, 0)
viewport_frame.Visible = true
viewport_frame.Parent = ScreenGui
local character = clone_character(Character)
character.Parent = viewport_frame
local viewport_frame_camera = Instance.new("Camera")
viewport_frame_camera.CFrame = CurrentCamera.CFrame
viewport_frame.CurrentCamera = viewport_frame_camera
end
Character:FindFirstChildOfClass("Humanoid").Died:Connect(function()
task.wait(1.3)
character_to_viewport_frame()
end)
what the hell is with the stuff under clone_character
also I forgot to mention, make sure to add a ScreenGUI
& select IgnoreGuiInset
in the properties
place.rbxl (46.3 KB)
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.