Hey there, im trying to do a random number game, and i want UI to have a size animation.
Video of issue:
The lua script:
local Market = game:GetService("MarketplaceService")
local player = game.Players.LocalPlayer
local id = "14864502278"
local TextLabel = script.Parent
function updateText()
local randomNumber = math.random(1, 1000)
TextLabel.Text = tostring(randomNumber)
if randomNumber == 690 then
game.MarketplaceService:PromptPurchase(id)
TextLabel:TweenSize(UDim2.new(0,256,0,64), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 2, true)
TextLabel.Size = UDim2.new(0,200,0, 50)
end
end
while true do
updateText()
wait(3)
end
local Market = game:GetService("MarketplaceService")
local Tween = game:GetService("TweenService")
local player = game.Players.LocalPlayer
local id = "14864502278"
local TextLabel = script.Parent
function updateText()
local randomNumber = math.random(1, 1000)
TextLabel.Text = tostring(randomNumber)
task.spawn(function()
Tween:Create(TextLabel, TweenInfo.new(0.1, Enum.EasingStyle.Quad), {TextSize = 12}):Play()
task.wait(0.1)
Tween:Create(TextLabel, TweenInfo.new(0.22, Enum.EasingStyle.Bounce, Enum.EasingDirection.Out), {TextSize = 35}):Play()
end)
if randomNumber == 690 then
game.MarketplaceService:PromptPurchase(id)
end
end
while true do
updateText()
wait(3)
end