How to save an image inside of the player?

how would i save an image that is inside of the player?

local player = game.Players.LocalPlayer
local character = player.Character
local icon = game.ReplicatedStorage.ICON
local copyicon = icon:Clone()
local decal = player.PlayerGui.Icon.Frame.TextBox
-------
local url = "rbxthumb://type=Asset&id=%i&w=150&h=150"

copyicon.Parent = character.Head
decal:GetPropertyChangedSignal("Text"):Connect(function()
    if not tonumber(decal.Text) then return; end
    copyicon.ImageLabel.Image = url:format(tonumber(decal.Text));
end)

i want it to save once the player entered a decal id, but i have no idea how to do that

You can either save the assetId in a NumberValue somewhere inside the player, or store it in a DataStore, or you could save the whole URL in a StrongValue, or create a decal with that Id and put it inside the player