local NewText
function setNewText(Text, Inst)
NewText = Text
for i=1,#Text do
Inst.Text = string.sub(Text, 1, i)
wait()
end
end
game.Lighting:GetPropertyChangedSignal("ClockTime"):Connect(function()
if game.Lighting.ClockTime >= 7 and game.Lighting.ClockTime < 9 then
game.StarterGui["CurrentTimeUI"].Local.Frame.TextLabel.Text = "Testing"
for i, p in pairs(game.Players:GetChildren()) do
setNewText("Testing", p.PlayerGui["CurrentTimeUI"].Local.Frame.TextLabel)
end
end
end)
You are hooking to “ClockTime”. This will change continuously between 7 and 9 so the connected function will fire indiscriminately at processor/ping speed. Either find a better way to connect the Lighting changes or put some sort of debounce to prevent continuous re-entry into the connected function until it is finished. Or flag entry once and reset it after the time goes beyond the range you require the animation to run only once over.