Update: I've solved the problem by myself. Thanks to those who tried to help :)

Explanation: So I was trying to make something like a custom player list, but it is a card. When a player joins the game, it will create a frame by cloning it from the card's gui, including details like their name, and profile picture. When the player joins, everything works fine. Frames are cloning and the frames are adjusting based on the position between one another. However, I tried to write a code so that when a player leaves, the frame gets destroyed. However, I tried to make it work in many ways, but it just won't destroy the frame and I have no idea why. (There is no error shown on the developer console as well.)

Here is my LocalScript named "PlayerInfoFrameCloneLocal" located in StarterGui > "PatientCardIssueScreenGui" (Name of the gui) > PlayerInfoFrameCloneLocal (LocalScript):

-- Made by Shirooo And edited by me
-- Variables
local Players = game:GetService("Players")
local PlayerInfoFrame = script.Parent:WaitForChild("PlayerInfoFrame")
local Slots = script.Parent:WaitForChild("Slots")
local Players_Table = {}
local Player = Players.LocalPlayer
local UserId = Player.UserId
local ThumbType = Enum.ThumbnailType.HeadShot
local ThumbSize = Enum.ThumbnailSize.Size60x60
local Content, IsReady = Players:GetUserThumbnailAsync(UserId, ThumbType, ThumbSize)

-- Functions
local function FrameCleanUp(Slot)
	repeat wait() until Slot.Position.X.Scale == -5
	Slot:Destroy()
end

local function FrameRemove(PlayerLeaving)
	if PlayerLeaving then
		local FindPlayerInfoFrameClone = Slots:FindFirstChild(PlayerLeaving)
		FindPlayerInfoFrameClone:TweenPosition(UDim2.fromScale(-5, 0.061), "Out", "Sine", 1.5)
		
		local Coroutine = coroutine.wrap(FrameCleanUp)
		Coroutine(FindPlayerInfoFrameClone)
	end
end

local function FrameAdd()
	local Children = Players:GetChildren()
	for C = 1, #Children do
		if Players_Table[Children[C].Name] == nil then
			Players_Table[Children[C].Name] = 1
			local PlayerInfoFrameClone = PlayerInfoFrame:Clone()
			PlayerInfoFrameClone.Name = Children[C].Name
			PlayerInfoFrameClone.TextButton.Text = PlayerInfoFrameClone.Name
			PlayerInfoFrameClone.Parent = Slots
			local ImageButton = PlayerInfoFrameClone:WaitForChild("ImageButton")
			ImageButton.Image = Content
			ImageButton.Size = UDim2.fromOffset(60, 60)
		end
	end
end

local function Adjust(PlayerLeaving)
	FrameAdd()
	FrameRemove(PlayerLeaving)
	local Count = 0
	for Key, Value in pairs(Players_Table) do
		Count = Count + 1
		local PlayerInfoFrameClone = Slots:FindFirstChild(Key)
		local Y_Position = 0.061 + (0.060) * (Count - 1)
		PlayerInfoFrameClone:TweenPosition(UDim2.new(0, 0, Y_Position, 0), "In", "Sine", 1.5, true)
	end
end

-- Events
Players.PlayerAdded:Connect(function()
	Adjust(nil)
end)
Players.PlayerRemoving:Connect(function(PlayerLeaving)
	Adjust(PlayerLeaving.Name)
end)

-- Setup
Adjust()