Cloning object doesn't work

Hello, i’ve made this quick script for my game on client side where when you get any coin in your account it will show on the screen but as i can see the object ain’t duplicated …

local hud = script.Parent.CurrencyGot

game.ReplicatedStorage.Events.AddCoins.OnClientEvent:Connect(function(amount)

local x = math.random(0.0, 1.0-hud.Coin.Size.X.Scale)

local y = math.random(0.0, 1.0-hud.Coin.Size.Y.Scale)

local obj = hud.Coin:Clone()

obj.Position = UDim2.new(x, 0, y, 0)

obj.Visible = true

obj.TextLabel.Text = convertNumberToText(amount)

wait(2.0)

obj:Destroy()

end)

Screenshot 2022-03-14 215705
and the localscript is in startergui (tested with print to see if the fireclient works and it does)

You need to set the parent or it will not work

The parent of the cloned instance is nil by default. As the previous post suggested you need to assign its parent property.