So I think it has something to do with my code im fairly new and im trying to make it so when the value of “Cash” changes the gui appears and position of the gui element moves to the bottom left corner, and the transparency goes to 1. The transparency works fine but for some reason instead of it moving to the bottom left it goes all the way to the top left instantly not even waiting that one second i told it to.
if anybody can tell me what im doing wrong because this is how i learned it.
also please give me some suggestions on my code format and if theres a simpler way to do this im just looking for advice on my coding too.
local Player = game.Players.LocalPlayer
local CashGui = script.Parent.CashFrame.CashLabel
local Cash = Player.ValueFolder.Cash
local CoinAddGui = script.Parent.Parent.AddedValues.Cash
local TweenService = game:GetService("TweenService")
local TweenI = TweenInfo.new(
1,
Enum.EasingStyle.Sine,
Enum.EasingDirection.InOut,
0,
false,
0
)
local Goal = {
ImageTransparency = 1,
Position = UDim2.new({0.114, 0},{0.842, 0})
}
local CoinTween = TweenService:Create(CoinAddGui, TweenI, Goal)
CashGui.Text = Cash.Value
local CurrentValue = Cash.Value
Cash:GetPropertyChangedSignal("Value"):Connect(function()
CoinAddGui.Visible = true
CoinAddGui.ImageTransparency = 0
CoinAddGui.Position = UDim2.new({0.271, 0},{0.645, 0})
CoinTween:Play()
wait(1)
CashGui.Text = Cash.Value
end)