Scrolling text Marquee? (No teleport)

Hey facepunch, Im using this code to achieve a scrolling text effect but when the text reaches the end of my ScrW() it teleports back to the other side. Now this is fine but I want the teleport to be seamless. Any way to do this?



local multiplier = 150
local width = ScrW()
local ypos = 10
local text = "Welcome "..LocalPlayer():Nick().. ", to Garrysmod Ex Machina! The current time is: "..os.date( "%a, %I:%M:%S %p" )
local font = "ScoreboardText"
local textcol = color_white

hook.Add("HUDPaint","DrawScrollText",function()
	draw.DrawText(text,font,math.fmod(SysTime() * multiplier,width),ypos,textcol,0)
end)


If I understand what you mean by seamless, you could draw it twice, once at the proper location, and once offset by width, so as one scrolls out the other scrolls in. Offset by +width if you are near the left, offset by -width if you are near the right.

Yeah you explained it about right. I guess to elaborate a bit more I would say think portal wise. (Text go’s out one way while coming back in on the opposite side)

PS: I cant for the life of me get this to scroll right. to left. Maybe because Ive been up for almost 42 hours now working on various things… :suicide:

put the teleport pos further out of the panel.