#how to make coin adding animation

18 messages · Page 1 of 1 (latest)

cursive ice
#

idk how

#

explain to me please

floral ivy
#

animation?

#

you mean change the text to the current coin value?

cursive ice
#

i need to make it so that when coins are added to the player, the number of added coins appears in the center and moves to the lower right corner

floral ivy
#

use tweens

cursive ice
#

dam i know it

#

how to show the number of added coins

floral ivy
#

set the text as the number of coins added just like that

cursive ice
#

?

floral ivy
#

TextLabel.Text = tostring(numberofcoinsadded)...

scarlet crescent
#
textlabel:GetAttributeChangedSignal("Text"):Connect(function()
    -- bounce animation
    local style = Enum.EasingStyle.Sine
    local bounceOffset = 0.2 -- in scale
    local offset = Vector2.yAxis * (textlabel.Size.Y * bounceOffset)
    
    -- bounce up
    textlabel:TweenPosition(
        textlabel.Position + offset, -- upwards
        Enum.EasingDirection.In, 
        Enum.EasingStyle.Sine,
        .2
    )
    task.wait(.2)
  -- bounce back down 
    textlabel:TweenPosition(
        textlabel.Position - offset, -- downwards
        Enum.EasingDirection.Out, 
        Enum.EasingStyle.Sine,
        .1
    )
end)
``` heres a quick example
#

a gui tween would play whenever its text changed

#

i havent tested yet

cursive ice
#

this is i know

#

idk how to show difference

scarlet crescent
#

what are you saying