So this is a script that should tween a textlabel to another textlabel named “Amount”.
Only problem is it tweens it to either the corner of the screen or to a far distance underneath the right position. So why is this happening? Cause its weird.
-- display money recieved
game:GetService('ReplicatedStorage'):FindFirstChild('ShowMoney').OnClientEvent:Connect(function(moneynum)
local text = script:FindFirstChild('MoneyText'):Clone()
text.Text = "$"..moneynum
local MoneyText = money:FindFirstChild('Amount')
local tweenService = game:GetService('TweenService')
local info = TweenInfo.new(.7,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false,0)
local Back = tweenService:Create(text,info,{Position = MoneyText.Position})
text.Parent = gui
text.Position = UDim2.new(math.random(5,86)/100,0,math.random(5,86)/100,0)
wait(0.7)
Back:Play()
Back.Completed:Wait()
text:Destroy()
end)