How would I destroy all Clones created - Roblox

Viewed 12

How would I destroy all GUI Clones created - Roblox

I've spent hours haven't found a reason to why it's not working.

function Notification(container, title, text, image)
    local newNotification = container:Clone()

    container.Enabled = true
    container.Frame.titleText.Text = title
    container.Frame.descriptionText.Text = text
    container.Frame.ImageLabel.Image = image
end

function Remove()
    script.Parent:destroy()
end

Notification(game.StarterGui.RampageInterface.LoadNotification, "RAMPAGE", "Rampage Notification System", "rbxassetid://7072707452")
wait(3)
Remove()
0 Answers
Related