I need to remove a Gui from a player's playergui. I am trying to remove it from it after two seconds which I have all the before script already made, but then I tell it to remove the gui, but it only deletes the one in the startergui. I need it to delete all of the gui's that were sent out to each player's playergui.
function onJoined(newPlayer)
local l = Instance.new("TextLabel", game.StarterGui.Banner.Frame)
l.Name = "PlayerJoined"
l.Size = UDim2.new(0.98, 0,0.9,0)
l.Position = UDim2.new(0.02,0,0.05,0)
l.TextColor3 = Color3.new(255,0,0)
l.FontSize = ("Size36")
l.Font = ("ArialBold")
l.BackgroundTransparency = ("1")
l.Text = (newPlayer.Name.. " has joined the game!")
wait(2)
l:Destroy() -- It won't remove. everything works up to here.
end
game.Players.PlayerAdded:connect(onJoined)

1 comment
local l = Instance.new("TextLabel", game.Players.LocalPlayer.PlayerGui.Banner.Frame)