I’m trying to achive this Tween with a TextLabel (see video), but I’m having some hard times coding it.
I’ve tried the following:
local t1 = TweenService:Create(complimentText, TweenInfo.new(0.5), {Rotation = 15})
local t2 = TweenService:Create(complimentText, TweenInfo.new(0.5), {Rotation = -15})
for i = 1, 10, 1 do
t1:Play()
t1.Completed:Connect(function()
wait(0.25)
t2:Play()
end)
wait(1)
end
But it is buggy and doesn’t work the way I expected. Can you help me?
local t1 = TweenService:Create(complimentText, TweenInfo.new(0.5), {Rotation = 15})
local t2 = TweenService:Create(complimentText, TweenInfo.new(0.5), {Rotation = -15})
for i = 1, 10, 1 do
t1:Play()
t1.Completed:Connect(function()
wait(0.25)
t2:Play()
end)
wait(1)
if count >= 10 then
complimentText.Rotation = 0
end
end
local num = 15
local t1 = TweenService:Create(complimentText, TweenInfo.new(0.5), {Rotation = num})
local t2 = TweenService:Create(complimentText, TweenInfo.new(0.5), {Rotation = -num})
for i = 1, 10, 1 do
t1:Play()
t1.Completed:Connect(function()
num = 30
t2:Play()
end)
wait(0.3) -- change this to whatever u like: wait() wait(0.5) any... i'm not sure
if count >= 10 then
complimentText.Rotation = 0
num = 15
end
end
local t1 = TweenService:Create(complimentText, TweenInfo.new(0.5), {Rotation = 15})
local t2 = TweenService:Create(complimentText, TweenInfo.new(0.5), {Rotation = -15})
local count = 0
for i = 1, 10, 1 do
t1:Play()
t1.Completed:Connect(function()
RunService.RenderStepped:Wait()
t2:Play()
end)
wait(0.5)
if count >= 10 then
complimentText.Rotation = 0
end
end
It works faster but you can still see it waiting a bit.
local num = 15
local t1 = TweenService:Create(complimentText, TweenInfo.new(0.25), {Rotation = num})
local t2 = TweenService:Create(complimentText, TweenInfo.new(0.25), {Rotation = -num})
for i = 1, 10, 1 do
t1:Play()
t1.Completed:Connect(function()
num = 30
t2:Play()
end)
wait(0.5)
if i >= 10 then
complimentText.Rotation = 0
num = 15
end
end
local t = TweenService:Create(complimentText, TweenInfo.new(0.25, Enum.EasingStyle.Quad, Enum.EasingDirection.Out, 0, true), {Rotation = 15})
complimentText.Rotation = -15
for i = 1, 10, 1 do
t:Play()
t.Completed:Wait()
task.wait(0.5) --Increase/decrease this if necessary.
end
complimentText.Rotation = 0