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)
and the localscript is in startergui (tested with print to see if the fireclient works and it does)